Skip to content

Commit

Permalink
chore: build release images for amd64 and arm64
Browse files Browse the repository at this point in the history
Added a cache
Build containers for both architectures
Drop old arm builds from goreleaser for now
  • Loading branch information
06kellyjac committed Jan 2, 2024
1 parent 34ed23f commit 56ebe59
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,25 @@ jobs:
build-push-docker-images:
runs-on: ubuntu-latest
steps:
- name: Cache container layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}${{ matrix.containers.suffix }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}${{ matrix.containers.suffix }}-buildx-
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
Expand Down Expand Up @@ -62,6 +76,11 @@ jobs:
severity: 'CRITICAL,HIGH'
trivyignores: './.trivy-config/.trivyignore'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64

- name: Build and push dev image ## should use cache image from the previous step
uses: docker/build-push-action@v5
with:
Expand Down
7 changes: 3 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ builds:
- windows
goarch:
- amd64
- arm
- arm64
goarm:
- 6
- 7
ignore:
- goos: darwin
goarch: arm
main: ./cmd/simulator/main.go
binary: simulator
archives:
Expand Down

0 comments on commit 56ebe59

Please sign in to comment.