Skip to content

Commit 50e40e2

Browse files
ci: Use matrix for nightly workflow
1 parent 263dc28 commit 50e40e2

File tree

1 file changed

+9
-44
lines changed

1 file changed

+9
-44
lines changed

.github/workflows/nightly-update.yml

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,19 @@ on:
66
- cron: "49 2 * * *"
77

88
jobs:
9-
fedora-ci-41:
9+
build-images:
10+
strategy:
11+
matrix:
12+
image: ["fedora-ci", "fedora-silverblue"]
13+
release: [ "41", "42", "unstable" ]
1014
uses: ./.github/workflows/build-image.yml
1115
with:
12-
image_name: "fedora-ci"
13-
tags: '41'
16+
image_name: ${{ matrix.image }}
17+
tags: ${{ matrix.release }}
1418
publish: true
15-
branch: f41
16-
17-
fedora-ci-42:
18-
uses: ./.github/workflows/build-image.yml
19-
with:
20-
image_name: "fedora-ci"
21-
tags: "42"
22-
publish: true
23-
branch: f42
24-
25-
fedora-silverblue-41:
26-
uses: ./.github/workflows/build-image.yml
27-
with:
28-
image_name: "fedora-silverblue"
29-
tags: '41'
30-
publish: true
31-
branch: f41
32-
33-
fedora-silverblue-42:
34-
uses: ./.github/workflows/build-image.yml
35-
with:
36-
image_name: "fedora-silverblue"
37-
tags: '42'
38-
publish: true
39-
branch: f42
40-
41-
fedora-ci-unstable:
42-
uses: ./.github/workflows/build-image.yml
43-
with:
44-
image_name: "fedora-ci"
45-
tags: unstable
46-
publish: true
47-
branch: main
48-
49-
fedora-silverblue-unstable:
50-
uses: ./.github/workflows/build-image.yml
51-
with:
52-
image_name: "fedora-silverblue"
53-
tags: unstable
54-
publish: true
55-
branch: main
19+
branch: "${{ contains(matrix.release, 'unstable') && 'main' || format('f{0}', matrix.release) }}"
5620
cleanup-old-images:
21+
needs: [ "build-images" ]
5722
runs-on: ubuntu-latest
5823
steps:
5924
- uses: "actions/delete-package-versions@v5"

0 commit comments

Comments
 (0)