Skip to content

Commit

Permalink
run multiplatform build in parallel
Browse files Browse the repository at this point in the history
Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
  • Loading branch information
daisukes committed Jun 14, 2024
1 parent 9b9eb1d commit e7b3197
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: Test Building Docker Image and Workspace

on:
push:
branches: [ daisukes/docker-buildx-bake-test ]

workflow_call:
inputs:
platform:
required: true
type: string
secrets:
dockerhub-token:
required: true

jobs:
test_build:
reusable_workflow_job:
runs-on: ubuntu-20.04
steps:
- name: Maximize build space
Expand All @@ -29,5 +35,5 @@ jobs:
- name: Buildx bake
shell: bash
run: |
docker login -u daisukesato80 -p "${{ secrets.DOCKERHUB_TOKEN }}"
./bake-docker.sh -P cabot-navigation
docker login -u daisukesato80 -p "${{ secrets.dockerhub-token }}"
./bake-docker.sh -p ${{ inputs.platform }}
20 changes: 20 additions & 0 deletions .github/workflows/push_action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test Building Docker Image and Workspace

on:
push:
branches: [ daisukes/docker-buildx-bake-test ]

jobs:
build-amd64:
uses: cmu-cabot/cabot-common/.github/workflows/build.yaml@daisukes/docker-buildx-bake-test
with:
platform: linux/amd64
secrets:
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

build-arm64:
uses: cmu-cabot/cabot-common/.github/workflows/build.yaml@daisukes/docker-buildx-bake-test
with:
platform: linux/arm64
secrets:
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

0 comments on commit e7b3197

Please sign in to comment.