Skip to content

Commit 3e878c0

Browse files
authored
feat: build both AMD64 and ARM64 (#11)
* feat: build both AMD64 and ARM64 * chore: update the workflow to allow building images on PRs
1 parent 20a6e58 commit 3e878c0

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/build_rechunk.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
name: Publish rechunk to GHCR
22

33
on:
4+
pull_request:
5+
paths:
6+
- "./Dockerfile"
7+
- "./.github/workflows/build_rechunk.yml"
48
workflow_dispatch:
59
inputs:
610
tag:
7-
description: 'The version to tag the package with:'
11+
description: "The version to tag the package with:"
812
required: true
9-
13+
1014
release:
1115
types: [published]
1216

@@ -24,12 +28,23 @@ jobs:
2428

2529
steps:
2630
- name: Login to GHCR
31+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release'
2732
run: echo "${{ secrets.GITHUB_TOKEN }}" | sudo podman login ghcr.io -u ${{ github.actor }} --password-stdin
28-
- uses: actions/checkout@v3
33+
34+
- uses: actions/checkout@v4
35+
36+
- name: Set up QEMU
37+
uses: docker/setup-qemu-action@v3
38+
2939
- name: Build Image
3040
run: |
31-
sudo podman build --tag 'fedora_build' .
41+
sudo podman build \
42+
--tag 'fedora_build' \
43+
--platform 'linux/amd64,linux/arm64' \
44+
.
45+
3246
- name: Upload Image
47+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release'
3348
id: upload
3449
shell: bash
3550
run: |
@@ -48,4 +63,3 @@ jobs:
4863
sudo podman push ghcr.io/hhd-dev/rechunk:stable
4964
sudo podman tag fedora_build ghcr.io/hhd-dev/rechunk:$VERSION
5065
sudo podman push ghcr.io/hhd-dev/rechunk:$VERSION
51-

0 commit comments

Comments
 (0)