Skip to content

Commit

Permalink
Update image-build.yml (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor authored Nov 12, 2024
1 parent 8ec3307 commit 38b7bb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Create safe tag for image
id: safe_tag
run: |
if [ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.head.ref }}" != "main" ]; then
if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ github.event.pull_request.head.ref }}" != "main" ]; then
echo "SAFE_TAG=$(echo ${{ github.event.pull_request.head.ref }} | sed 's/[^a-zA-Z0-9.]/-/g')-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_OUTPUT
else
echo "SAFE_TAG=$(echo ${{ inputs.tag }} | sed 's/[^a-zA-Z0-9.]/-/g')" >> $GITHUB_OUTPUT
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Output VERSION_REF
id: output_version_ref
run: |
if [ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.head.ref }}" != "main" ]; then
if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ github.event.pull_request.head.ref }}" != "main" ]; then
# if on a PR we need to get the current branch name
echo "VERSION_REF=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
else
Expand Down

0 comments on commit 38b7bb6

Please sign in to comment.