Skip to content

Commit

Permalink
revert: "ci: use matrix build for multi-arch build" (#159)
Browse files Browse the repository at this point in the history
Reverts #156
  • Loading branch information
tisonkun authored Oct 10, 2024
1 parent 9bf10d0 commit 94eae64
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,23 @@ on:
workflow_dispatch:

jobs:
build-and-push-hawkeye:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, buildjet-4vcpu-ubuntu-2204-arm]
arch: [amd64, arm64]
include:
- os: ubuntu-latest
arch: amd64
- os: buildjet-4vcpu-ubuntu-2204-arm
arch: arm64
build-and-push-hawkeye-amd64:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- name: Build and push by digest
uses: ./.github/actions/docker-push-by-digest
id: build
with:
name: hawkeye
file: Dockerfile
outputs:
digest: ${{ steps.build.outputs.digest }}

build-and-push-hawkeye-arm64:
runs-on: buildjet-4vcpu-ubuntu-2204-arm
permissions:
packages: write
steps:
Expand All @@ -46,34 +52,38 @@ jobs:
name: hawkeye
file: Dockerfile
outputs:
digest-${{ matrix.arch }}: ${{ steps.build.outputs.digest }}
digest: ${{ steps.build.outputs.digest }}

release-hawkeye:
runs-on: ubuntu-latest
permissions:
packages: write
needs: build-and-push-hawkeye
needs:
- build-and-push-hawkeye-amd64
- build-and-push-hawkeye-arm64
steps:
- uses: actions/checkout@v4
- name: Merge and push manifest
uses: ./.github/actions/docker-release
with:
name: hawkeye
digests: >
${{ needs.build-and-push-hawkeye.outputs.digest-amd64 }}
${{ needs.build-and-push-hawkeye.outputs.digest-arm64 }}
${{needs.build-and-push-hawkeye-amd64.outputs.digest}}
${{needs.build-and-push-hawkeye-arm64.outputs.digest}}
release-native:
runs-on: ubuntu-latest
permissions:
packages: write
needs: build-and-push-hawkeye
needs:
- build-and-push-hawkeye-amd64
- build-and-push-hawkeye-arm64
steps:
- uses: actions/checkout@v4
- name: Merge and push manifest
uses: ./.github/actions/docker-release
with:
name: hawkeye-native
digests: >
ghcr.io/${{ github.repository_owner }}/hawkeye@${{ needs.build-and-push-hawkeye.outputs.digest-amd64 }}
ghcr.io/${{ github.repository_owner }}/hawkeye@${{ needs.build-and-push-hawkeye.outputs.digest-arm64 }}
ghcr.io/${{ github.repository_owner }}/hawkeye@${{needs.build-and-push-hawkeye-amd64.outputs.digest}}
ghcr.io/${{ github.repository_owner }}/hawkeye@${{needs.build-and-push-hawkeye-arm64.outputs.digest}}

0 comments on commit 94eae64

Please sign in to comment.