mirror of
https://github.com/kerberos-io/agent.git
synced 2025-09-27 04:26:33 +08:00
Update GitHub Actions workflow to support multiple architectures in build matrix
This commit is contained in:
33
.github/workflows/pr-build.yml
vendored
33
.github/workflows/pr-build.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
architecture: [amd64]
|
architecture: [amd64, arm64, arm-v7, arm-v6]
|
||||||
steps:
|
steps:
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@@ -33,33 +33,4 @@ jobs:
|
|||||||
- name: Available platforms
|
- name: Available platforms
|
||||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||||
- name: Run Buildx
|
- name: Run Buildx
|
||||||
run: docker buildx build --platform linux/$(echo ${{matrix.architecture}} | tr - /) -t $REPO-arch:arch-${{matrix.architecture}}-${{github.event.inputs.tag || github.ref_name}} .
|
run: docker buildx build --platform linux/$(echo ${{matrix.architecture}} | tr - /) -t ${{matrix.architecture}} .
|
||||||
|
|
||||||
build-other:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
needs: build-amd64
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
architecture: [arm64, arm-v7, arm-v6]
|
|
||||||
steps:
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- uses: benjlevesque/short-sha@v2.1
|
|
||||||
id: short-sha
|
|
||||||
with:
|
|
||||||
length: 7
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v2
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
- name: Available platforms
|
|
||||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
|
||||||
- name: Run Buildx
|
|
||||||
run: docker buildx build --platform linux/$(echo ${{matrix.architecture}} | tr - /) -t $REPO-arch:arch-${{matrix.architecture}}-${{github.event.inputs.tag || github.ref_name}} .
|
|
Reference in New Issue
Block a user