Skip to content

Commit aa7e31c

Browse files
committed
Fix workflows
Signed-off-by: Marco Franssen <[email protected]>
1 parent e59bb08 commit aa7e31c

File tree

3 files changed

+38
-14
lines changed

3 files changed

+38
-14
lines changed

.github/workflows/nightly_build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ jobs:
1414
uses: actions/[email protected]
1515
with:
1616
go-version: 1.19
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v2
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v2
21+
- name: Install regctl
22+
uses: regclient/actions/regctl-installer@main
1723
- name: Build image
1824
run: make docker-build
1925
- name: Log in to GHCR

.github/workflows/pr_build.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,36 @@ jobs:
1212
uses: actions/[email protected]
1313
with:
1414
go-version: 1.19
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v2
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v2
1519
- name: Build image
1620
run: make docker-build
17-
- name: Export image
18-
run: docker save ghcr.io/spiffe/spire-controller-manager:devel | gzip > image.tar.gz
21+
- name: Export images
22+
run: tar -czvf images.tar.gz *-image.tar
1923
- name: Archive image
2024
uses: actions/[email protected]
2125
with:
22-
name: image
23-
path: image.tar.gz
26+
name: images
27+
path: images.tar.gz
2428
test-image:
2529
needs: [build-image]
2630
runs-on: ubuntu-latest
2731
steps:
2832
- name: Checkout
2933
uses: actions/[email protected]
34+
- name: Install regctl
35+
uses: regclient/actions/regctl-installer@main
3036
- name: Download archived image
3137
uses: actions/[email protected]
3238
with:
33-
name: image
39+
name: images
3440
path: .
35-
- name: Load archived image
36-
run: zcat image.tar.gz | docker load
41+
- name: Load archived images
42+
run: |
43+
tar xvf images.tar.gz
44+
make load-images
3745
- name: Test image
3846
run: |
3947
docker tag ghcr.io/spiffe/spire-controller-manager:devel ghcr.io/spiffe/spire-controller-manager:nightly

.github/workflows/release_build.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ jobs:
1313
uses: actions/[email protected]
1414
with:
1515
go-version: 1.19
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v2
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v2
1620
- name: Build image
1721
run: make docker-build
1822
- name: Export image
19-
run: docker save ghcr.io/spiffe/spire-controller-manager:devel | gzip > image.tar.gz
23+
run: tar -czvf images.tar.gz *-image.tar
2024
- name: Archive image
2125
uses: actions/[email protected]
2226
with:
23-
name: image
24-
path: image.tar.gz
27+
name: images
28+
path: images.tar.gz
2529
test-image:
2630
needs: [build-image]
2731
runs-on: ubuntu-latest
@@ -31,10 +35,12 @@ jobs:
3135
- name: Download archived image
3236
uses: actions/[email protected]
3337
with:
34-
name: image
38+
name: images
3539
path: .
3640
- name: Load archived image
37-
run: zcat image.tar.gz | docker load
41+
run: |
42+
zcat images.tar.gz
43+
make load-images
3844
- name: Test image
3945
run: |
4046
docker tag ghcr.io/spiffe/spire-controller-manager:devel ghcr.io/spiffe/spire-controller-manager:nightly
@@ -45,10 +51,12 @@ jobs:
4551
steps:
4652
- name: Checkout
4753
uses: actions/[email protected]
54+
- name: Install regctl
55+
uses: regclient/actions/regctl-installer@main
4856
- name: Download archived image
4957
uses: actions/[email protected]
5058
with:
51-
name: image
59+
name: images
5260
path: .
5361
- name: Load archived image
5462
run: zcat image.tar.gz | docker load
@@ -59,7 +67,9 @@ jobs:
5967
username: ${{ github.actor }}
6068
password: ${{ secrets.GITHUB_TOKEN }}
6169
- name: Push image
62-
run: ./.github/workflows/scripts/push-images.sh "${GITHUB_REF#refs/tags/v}"
70+
run: |
71+
tar xvf images.tar.gz
72+
./.github/workflows/scripts/push-images.sh "${GITHUB_REF}"
6373
- name: Create Release
6474
env:
6575
# GH_REPO is required for older releases of `gh`. Until we're

0 commit comments

Comments
 (0)