Skip to content

Commit

Permalink
Upd: Beta Updated with GH Workflow (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhanW3 authored Apr 12, 2024
1 parent 28103be commit bb07297
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/tagBasedImageBuild.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Tag Based Image Build

on:
create: # This listens to create events, which includes tag creations
release:
types: [created] # This listens to release creation events

jobs:
buildImageForNewTag:
if: startsWith(github.ref, 'refs/tags/') # Only run this job when a tag is created
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
Expand All @@ -17,6 +20,9 @@ jobs:

- name: Checkout code
uses: actions/checkout@v2
with:
# Fetches the branch at which the release was made
ref: ${{ github.event.release.target_commitish }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -35,10 +41,10 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: |
thirdweb/engine:${{ github.ref_name }}
thirdweb/engine:latest
thirdweb/engine:${{ github.event.release.tag_name }}
${{ env.LATEST_TAG }}
build-args: |
ENGINE_VERSION=${{ github.ref_name }}
ENGINE_VERSION=${{ github.event.release.tag_name }}
- name: Check Disk Space After Build
run: df -h

0 comments on commit bb07297

Please sign in to comment.