Skip to content

Commit 6c177eb

Browse files
authored
Build container image after a branch sync
1 parent 31c9159 commit 6c177eb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ on:
66
- v*
77
release:
88
types: [ "published" ]
9+
# The "Sync branch" workflow doesn't trigger the push event, therefore we need a separate trigger for that
10+
workflow_run:
11+
workflows: [Sync branch]
12+
types:
13+
- completed
914

1015
env:
1116
# Use docker.io for Docker Hub if empty
1217
REGISTRY: ghcr.io
1318
# github.repository as <account>/<repo>
1419
IMAGE_NAME: ${{ github.repository }}
20+
# Branch to build the container image from
21+
BRANCH: v1
1522

1623
jobs:
1724
build:
@@ -24,6 +31,8 @@ jobs:
2431
steps:
2532
- name: Checkout repository
2633
uses: actions/checkout@v4
34+
with:
35+
ref: ${{ env.BRANCH }}
2736

2837
- name: Get Node Version
2938
run: echo "NODE_VERSION=$(cat .node-version)" >> $GITHUB_ENV

0 commit comments

Comments
 (0)