Skip to content

Commit e43ba45

Browse files
committed
.github/workflows/build.yaml: use a matrix instead of all at once
it seems there's some metadata leakage between images, this should ensure that's prevented.
1 parent ccfe0db commit e43ba45

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.github/workflows/build.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches:
88
- master
9+
paths-ignore:
10+
- COPYING
11+
- README.md
912
push:
1013
branches:
1114
- master
@@ -20,8 +23,17 @@ concurrency:
2023
jobs:
2124
build:
2225
runs-on: ubuntu-latest
23-
outputs:
24-
metadata: ${{ steps.build_and_push.outputs.metadata }}
26+
27+
strategy:
28+
matrix:
29+
libc:
30+
- 'glibc'
31+
- 'musl'
32+
variant:
33+
- ''
34+
- '-full'
35+
- '-busybox'
36+
2537
steps:
2638
- name: Checkout
2739
uses: classabbyamp/treeless-checkout-action@v1
@@ -31,12 +43,7 @@ jobs:
3143
uses: docker/metadata-action@v4
3244
with:
3345
images: |
34-
ghcr.io/${{ github.repository_owner }}/void-glibc
35-
ghcr.io/${{ github.repository_owner }}/void-glibc-full
36-
ghcr.io/${{ github.repository_owner }}/void-glibc-busybox
37-
ghcr.io/${{ github.repository_owner }}/void-musl
38-
ghcr.io/${{ github.repository_owner }}/void-musl-full
39-
ghcr.io/${{ github.repository_owner }}/void-musl-busybox
46+
ghcr.io/${{ github.repository_owner }}/void-${{ matrix.libc }}${{ matrix.variant }}
4047
tags: |
4148
type=sha,prefix=
4249
type=raw,value=latest,enable={{is_default_branch}}
@@ -70,6 +77,7 @@ jobs:
7077
uses: docker/bake-action@v3
7178
with:
7279
push: ${{ github.event_name != 'pull_request' }}
80+
targets: void-${{ matrix.libc }}${{ matrix.variant }}
7381
files: |
7482
docker-bake.hcl
7583
${{ steps.meta.outputs.bake-file }}

0 commit comments

Comments
 (0)