Skip to content

Commit

Permalink
feat: use build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
RouHim committed Aug 18, 2022
1 parent dff40e8 commit d8bca3a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ jobs:
name: Build container image
needs: [ check-oci-config, check-repo, check-code-style, check-code, test ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container-image-arch: [ amd64, arm64, arm ]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -147,7 +151,7 @@ jobs:
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.TAG }}
archs: amd64,arm64,arm
archs: ${{ matrix.container-image-arch }}
containerfiles: |
./Containerfile
oci: true
Expand All @@ -158,7 +162,7 @@ jobs:
- name: Upload container image
uses: actions/upload-artifact@v3
with:
name: image
name: ${{ matrix.container-image-arch }}
path: image.tar

scan-container-image:
Expand All @@ -168,7 +172,7 @@ jobs:
strategy:
fail-fast: false
matrix:
container-image-arch: [ linux/amd64, linux/arm64, linux/arm/v7 ]
container-image-arch: [ amd64, arm64, arm ]
steps:
- name: Download Container Image
uses: actions/download-artifact@v3
Expand All @@ -195,7 +199,7 @@ jobs:
strategy:
fail-fast: false
matrix:
container-image-arch: [ linux/amd64, linux/arm64, linux/arm/v7 ]
container-image-arch: [ amd64, arm64, arm ]
steps:
- name: Download Container Image
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -228,7 +232,7 @@ jobs:
strategy:
fail-fast: false
matrix:
container-image-arch: [ linux/amd64, linux/arm64, linux/arm/v7 ]
container-image-arch: [ amd64, arm64, arm ]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down

0 comments on commit d8bca3a

Please sign in to comment.