-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (97 loc) · 2.52 KB
/
release.yml
File metadata and controls
106 lines (97 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Release
on:
workflow_dispatch:
# Runs at 00:00, only on Saturday
schedule:
- cron: '0 0 * * SAT'
push:
branches:
- main
paths:
- 'alpine/**'
- 'debian/**'
- 'modules/**'
- 'docker-bake.hcl'
- 'nginx-modules.json'
concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GH_TOKEN: ${{ github.token}}
permissions:
contents: write
packages: write
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate builder matrix
id: generate-builder
uses: docker/bake-action/subaction/matrix@v6
with:
target: builders
- name: Generate alpine matrix
id: generate-mod-alpine
uses: docker/bake-action/subaction/matrix@v6
with:
target: mod-alpine
- name: Generate debian matrix
id: generate-mod-debian
uses: docker/bake-action/subaction/matrix@v6
with:
target: mod-debian
outputs:
builder-matrix: ${{ steps.generate-builder.outputs.matrix }}
mod-alpine-matrix: ${{ steps.generate-mod-alpine.outputs.matrix }}
mod-debian-matrix: ${{ steps.generate-mod-debian.outputs.matrix }}
prepare:
name: prepare
# continue-on-error: true
needs:
- generate
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.generate.outputs.builder-matrix) }}
uses: ./.github/workflows/use-docker-build.yml
secrets: inherit
with:
targets: ${{ matrix.target }}
push: ${{ github.event_name != 'pull_request' }}
alpine:
name: alpine
# continue-on-error: true
needs:
- generate
- prepare
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.generate.outputs.mod-alpine-matrix) }}
uses: ./.github/workflows/use-docker-build.yml
secrets: inherit
with:
targets: ${{ matrix.target }}
push: ${{ github.event_name != 'pull_request' }}
debian:
name: debian
# continue-on-error: true
needs:
- generate
- prepare
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.generate.outputs.mod-debian-matrix) }}
uses: ./.github/workflows/use-docker-build.yml
secrets: inherit
with:
targets: ${{ matrix.target }}
push: ${{ github.event_name != 'pull_request' }}
generate-readme:
needs:
- alpine
- debian
uses: ./.github/workflows/use-readme.yml
secrets: inherit