Skip to content

Commit

Permalink
workflows: build image in parallel (runatlantis#2361)
Browse files Browse the repository at this point in the history
* Enable GitHub matrix strategy to run builds in parallel

* apply matrix build for the other images

Signed-off-by: Rui Chen <rui@chenrui.dev>

Co-authored-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
waeltken and chenrui333 authored Jul 7, 2022
1 parent 6e997db commit 8c0ca6b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/atlantis-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ concurrency:
cancel-in-progress: true

jobs:
build:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- linux/arm64/v8
- linux/amd64
- linux/arm/v7
steps:
- uses: actions/checkout@v3

Expand All @@ -44,7 +50,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: docker-base
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
platforms: ${{ matrix.platform }}
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis-base:${{env.TODAY}}
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/atlantis-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- linux/arm64/v8
- linux/amd64
- linux/arm/v7
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand Down Expand Up @@ -44,7 +50,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
platforms: ${{ matrix.platform }}
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis:dev
Expand All @@ -59,7 +65,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
platforms: ${{ matrix.platform }}
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis:${{ env.RELEASE_VERSION }}
Expand All @@ -70,7 +76,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
platforms: ${{ matrix.platform }}
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/atlantis:${{ env.RELEASE_VERSION }}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/testing-env-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- linux/arm64/v8
- linux/amd64
- linux/arm/v7
steps:
- uses: actions/checkout@v3

Expand All @@ -40,7 +46,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: testing
platforms: linux/arm64/v8,linux/amd64,linux/arm/v7
platforms: ${{ matrix.platform }}
push: true
tags: |
ghcr.io/runatlantis/testing-env:${{env.TODAY}}
Expand Down

0 comments on commit 8c0ca6b

Please sign in to comment.