From fb01d3866785156de55ac319b1645628b952bbac Mon Sep 17 00:00:00 2001 From: farhanW3 Date: Thu, 11 Apr 2024 17:33:08 -0700 Subject: [PATCH] Updates to GH workflow to not push to if not release not from main --- .github/workflows/tagBasedImageBuild.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tagBasedImageBuild.yml b/.github/workflows/tagBasedImageBuild.yml index a64679170..196ab8642 100644 --- a/.github/workflows/tagBasedImageBuild.yml +++ b/.github/workflows/tagBasedImageBuild.yml @@ -7,6 +7,9 @@ on: jobs: buildImageForNewTag: runs-on: ubuntu-latest + # Set environment variables + env: + LATEST_TAG: ${{ (github.event.release.target_commitish == 'main') && 'thirdweb/engine:latest' || '' }} steps: - name: Check Disk Space Before Build @@ -39,7 +42,7 @@ jobs: push: true tags: | thirdweb/engine:${{ github.event.release.tag_name }} - ${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' }} + ${{ env.LATEST_TAG }} build-args: | ENGINE_VERSION=${{ github.event.release.tag_name }}