Skip to content

Commit a6930af

Browse files
authored
Updates to GH workflow to not push to if not release not from main (#495)
1 parent 8305d06 commit a6930af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/tagBasedImageBuild.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
jobs:
88
buildImageForNewTag:
99
runs-on: ubuntu-latest
10+
# Set environment variables
11+
env:
12+
LATEST_TAG: ${{ (github.event.release.target_commitish == 'main') && 'thirdweb/engine:latest' || '' }}
1013

1114
steps:
1215
- name: Check Disk Space Before Build
@@ -39,7 +42,7 @@ jobs:
3942
push: true
4043
tags: |
4144
thirdweb/engine:${{ github.event.release.tag_name }}
42-
${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' }}
45+
${{ env.LATEST_TAG }}
4346
build-args: |
4447
ENGINE_VERSION=${{ github.event.release.tag_name }}
4548

0 commit comments

Comments
 (0)