Skip to content

Commit 0908509

Browse files
authored
Merge pull request #21 from joyeecheung/orchestrator
Use one orchestrator workflow to trigger platform specific builds
1 parent 2cf4b60 commit 0908509

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

.github/workflows/docker-build-and-publish-linux-amd64.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ name: Build and Publish Linux AMD64 Image
22

33
on:
44
workflow_dispatch: # allows us to trigger runs manually in the GitHub UI
5-
schedule:
6-
- cron: '0 0 * * *' # runs nightly
5+
workflow_call: # allows this workflow to be called by another workflow
76

87
jobs:
98
docker:
10-
if: ${{ github.ref == format('refs/heads/{0}', vars.NIGHTLY_BRANCH) }}
119
runs-on: ubuntu-24.04
1210
steps: # See https://docs.docker.com/build/ci/github-actions/multi-platform/
1311
- name: Login to DockerHub

.github/workflows/docker-build-and-publish-linux-arm64.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ name: Build and Publish Linux ARM64 Image
22

33
on:
44
workflow_dispatch: # allows us to trigger runs manually in the GitHub UI
5-
schedule:
6-
- cron: '0 0 * * *' # runs nightly
5+
workflow_call: # allows this workflow to be called by another workflow
76

87
jobs:
98
docker:
10-
if: ${{ github.ref == format('refs/heads/{0}', vars.NIGHTLY_BRANCH) }}
119
runs-on: ubuntu-24.04-arm
1210
steps: # See https://docs.docker.com/build/ci/github-actions/multi-platform/
1311
- name: Login to DockerHub

.github/workflows/docker-build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Nightly Build Orchestrator
2+
3+
on:
4+
workflow_dispatch: # allows us to trigger runs manually in the GitHub UI
5+
repository_dispatch: # allows us to trigger runs from an external repository
6+
schedule:
7+
- cron: '0 0 * * *' # runs nightly
8+
9+
# When any of the build workflows complete successfully on the nightly branch,
10+
# the merge workflow will be triggered by those workflows directly to update
11+
# the build for that platform. These are run independently and concurrently,
12+
# if any of them fail, at worst the image for that specific platform won't be
13+
# updated, but at least one usable image for a platform is always available,
14+
# which is better than dragging the updates for all platforms to wait
15+
# for one platform to be fixed.
16+
jobs:
17+
call_build_arm64:
18+
if: ${{ github.ref == format('refs/heads/{0}', vars.NIGHTLY_BRANCH) }}
19+
uses: ./.github/workflows/docker-build-and-publish-linux-arm64.yml
20+
secrets: inherit
21+
22+
call_build_amd64:
23+
if: ${{ github.ref == format('refs/heads/{0}', vars.NIGHTLY_BRANCH) }}
24+
uses: ./.github/workflows/docker-build-and-publish-linux-amd64.yml
25+
secrets: inherit

0 commit comments

Comments
 (0)