Skip to content

Commit

Permalink
fixup branch extraction for docker tags
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall authored Dec 17, 2024
1 parent 87ccc2c commit abb193a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
- uses: 'actions/checkout@v4'
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
run: |-
BRANCH=$(echo "${GITHUB_REF#refs/heads/}" | sed 's/[^a-zA-Z0-9._-]//g' | awk '{print substr($0, length($0)-120)}')
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
id: extract_branch
- name: Extract tag name
shell: bash
Expand Down Expand Up @@ -68,4 +70,4 @@ jobs:
tags: |
us-docker.pkg.dev/${{ secrets.GCLOUD_PROJECT }}/public/fabricator:${{steps.extract_branch.outputs.branch}}-${{steps.extract_tag.outputs.tag}}
us-docker.pkg.dev/${{ secrets.GCLOUD_PROJECT }}/public/fabricator:${{steps.extract_branch.outputs.branch}}

0 comments on commit abb193a

Please sign in to comment.