Skip to content

Commit 8305d06

Browse files
authored
updates to GH flow, to use branch (#484)
* updates to GH flow, to use branch * removed prelease incorrect tag * upds * got back tag creation check * upds * comments updated * final upds to handle the flow * Updated to use release::create for CI/CD image build/push flow
1 parent 4a97c7a commit 8305d06

File tree

2 files changed

+8
-48
lines changed

2 files changed

+8
-48
lines changed

.github/workflows/beta.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/tagBasedImageBuild.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Tag Based Image Build
22

33
on:
4-
create: # This listens to create events, which includes tag creations
4+
release:
5+
types: [created] # This listens to release creation events
56

67
jobs:
78
buildImageForNewTag:
8-
if: startsWith(github.ref, 'refs/tags/') # Only run this job when a tag is created
99
runs-on: ubuntu-latest
1010

1111
steps:
@@ -17,6 +17,9 @@ jobs:
1717

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

2124
- name: Set up Docker Buildx
2225
uses: docker/setup-buildx-action@v1
@@ -35,10 +38,10 @@ jobs:
3538
platforms: linux/amd64,linux/arm64
3639
push: true
3740
tags: |
38-
thirdweb/engine:${{ github.ref_name }}
39-
thirdweb/engine:latest
41+
thirdweb/engine:${{ github.event.release.tag_name }}
42+
${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' }}
4043
build-args: |
41-
ENGINE_VERSION=${{ github.ref_name }}
44+
ENGINE_VERSION=${{ github.event.release.tag_name }}
4245
4346
- name: Check Disk Space After Build
4447
run: df -h

0 commit comments

Comments
 (0)