88 branches :
99 - main
1010 paths-ignore :
11- - ' docs/**'
11+ - " docs/**"
1212 push :
1313 branches :
1414 - main
1818 inputs :
1919 # checkov:skip=CKV_GHA_7
2020 version :
21- description : ' FrankenPHP version'
21+ description : " FrankenPHP version"
2222 required : false
2323 type : string
2424 schedule :
25- - cron : ' 0 4 * * *'
25+ - cron : " 0 4 * * *"
2626permissions :
2727 contents : read
2828env :
4242 skip : ${{ steps.check.outputs.skip }}
4343 ref : ${{ steps.check.outputs.ref || (github.event_name == 'workflow_dispatch' && inputs.version) || '' }}
4444 steps :
45- -
46- name : Check PHP versions
45+ - name : Check PHP versions
4746 id : check
4847 env :
4948 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -77,17 +76,14 @@ jobs:
7776 echo ref="$(gh release view --repo dunglas/frankenphp --json tagName --jq '.tagName')"
7877 echo skip=false
7978 } >> "${GITHUB_OUTPUT}"
80- -
81- uses : actions/checkout@v4
79+ - uses : actions/checkout@v4
8280 if : ${{ !fromJson(steps.check.outputs.skip) }}
8381 with :
8482 ref : ${{ steps.check.outputs.ref }}
85- -
86- name : Set up Docker Buildx
83+ - name : Set up Docker Buildx
8784 if : ${{ !fromJson(steps.check.outputs.skip) }}
8885 uses : docker/setup-buildx-action@v3
89- -
90- name : Create variants matrix
86+ - name : Create variants matrix
9187 if : ${{ !fromJson(steps.check.outputs.skip) }}
9288 id : matrix
9389 shell : bash
@@ -114,55 +110,44 @@ jobs:
114110 variant : ${{ fromJson(needs.prepare.outputs.variants) }}
115111 platform : ${{ fromJson(needs.prepare.outputs.platforms) }}
116112 include :
117- -
118- race : " "
113+ - race : " "
119114 qemu : true
120- -
121- platform : linux/amd64
115+ - platform : linux/amd64
122116 qemu : false
123117 race : " -race" # The Go race detector is only supported on amd64
124- -
125- platform : linux/386
118+ - platform : linux/386
126119 qemu : false
127120 exclude :
128121 # arm/v6 is only available for Alpine: https://github.com/docker-library/golang/issues/502
129- -
130- variant : php-${{ needs.prepare.outputs.php82_version }}-bookworm
122+ - variant : php-${{ needs.prepare.outputs.php82_version }}-bookworm
131123 platform : linux/arm/v6
132- -
133- variant : php-${{ needs.prepare.outputs.php83_version }}-bookworm
124+ - variant : php-${{ needs.prepare.outputs.php83_version }}-bookworm
134125 platform : linux/arm/v6
135126 steps :
136- -
137- name : Prepare
127+ - name : Prepare
138128 id : prepare
139129 run : |
140130 platform=${{ matrix.platform }}
141131 echo "sanitized_platform=${platform//\//-}" >> "${GITHUB_OUTPUT}"
142- -
143- uses : actions/checkout@v4
132+ - uses : actions/checkout@v4
144133 with :
145134 ref : ${{ needs.prepare.outputs.ref }}
146- -
147- name : Set up QEMU
135+ - name : Set up QEMU
148136 if : matrix.qemu
149137 uses : docker/setup-qemu-action@v3
150138 with :
151139 platforms : ${{ matrix.platform }}
152- -
153- name : Set up Docker Buildx
140+ - name : Set up Docker Buildx
154141 uses : docker/setup-buildx-action@v3
155142 with :
156143 platforms : ${{ matrix.platform }}
157- -
158- name : Login to DockerHub
144+ - name : Login to DockerHub
159145 if : fromJson(needs.prepare.outputs.push)
160146 uses : docker/login-action@v3
161147 with :
162148 username : ${{ secrets.REGISTRY_USERNAME }}
163149 password : ${{ secrets.REGISTRY_PASSWORD }}
164- -
165- name : Build
150+ - name : Build
166151 id : build
167152 uses : docker/bake-action@v5
168153 with :
@@ -187,8 +172,7 @@ jobs:
187172 SHA : ${{ github.sha }}
188173 VERSION : ${{ (github.ref_type == 'tag' && github.ref_name) || needs.prepare.outputs.ref || 'dev' }}
189174 PHP_VERSION : ${{ needs.prepare.outputs.php_version }}
190- -
191- # Workaround for https://github.com/actions/runner/pull/2477#issuecomment-1501003600
175+ - # Workaround for https://github.com/actions/runner/pull/2477#issuecomment-1501003600
192176 name : Export metadata
193177 if : fromJson(needs.prepare.outputs.push)
194178 run : |
@@ -201,26 +185,23 @@ jobs:
201185 touch "/tmp/metadata/runner/${runnerDigest#sha256:}"
202186 env :
203187 METADATA : ${{ steps.build.outputs.metadata }}
204- -
205- name : Upload builder metadata
188+ - name : Upload builder metadata
206189 if : fromJson(needs.prepare.outputs.push)
207190 uses : actions/upload-artifact@v4
208191 with :
209192 name : metadata-builder-${{ matrix.variant }}-${{ steps.prepare.outputs.sanitized_platform }}
210193 path : /tmp/metadata/builder/*
211194 if-no-files-found : error
212195 retention-days : 1
213- -
214- name : Upload runner metadata
196+ - name : Upload runner metadata
215197 if : fromJson(needs.prepare.outputs.push)
216198 uses : actions/upload-artifact@v4
217199 with :
218200 name : metadata-runner-${{ matrix.variant }}-${{ steps.prepare.outputs.sanitized_platform }}
219201 path : /tmp/metadata/runner/*
220202 if-no-files-found : error
221203 retention-days : 1
222- -
223- name : Run tests
204+ - name : Run tests
224205 if : ${{ !matrix.qemu && !fromJson(needs.prepare.outputs.push) }}
225206 run : |
226207 docker run --platform=${{ matrix.platform }} --rm \
@@ -230,7 +211,7 @@ jobs:
230211 METADATA : ${{ steps.build.outputs.metadata }}
231212 # Adapted from https://docs.docker.com/build/ci/github-actions/multi-platform/
232213 push :
233- runs-on : ubuntu-latest
214+ runs-on : ubuntu-latest
234215 needs :
235216 - prepare
236217 - build
@@ -239,26 +220,22 @@ jobs:
239220 fail-fast : false
240221 matrix :
241222 variant : ${{ fromJson(needs.prepare.outputs.variants) }}
242- target : [' builder', ' runner' ]
223+ target : [" builder", " runner" ]
243224 steps :
244- -
245- name : Download metadata
225+ - name : Download metadata
246226 uses : actions/download-artifact@v4
247227 with :
248228 pattern : metadata-${{ matrix.target }}-${{ matrix.variant }}-*
249229 path : /tmp/metadata
250230 merge-multiple : true
251- -
252- name : Set up Docker Buildx
231+ - name : Set up Docker Buildx
253232 uses : docker/setup-buildx-action@v3
254- -
255- name : Login to DockerHub
233+ - name : Login to DockerHub
256234 uses : docker/login-action@v3
257235 with :
258236 username : ${{ secrets.REGISTRY_USERNAME }}
259237 password : ${{ secrets.REGISTRY_PASSWORD }}
260- -
261- name : Create manifest list and push
238+ - name : Create manifest list and push
262239 working-directory : /tmp/metadata
263240 run : |
264241 set -x
@@ -267,10 +244,9 @@ jobs:
267244 $(printf "${IMAGE_NAME}@sha256:%s " *)
268245 env :
269246 METADATA : ${{ needs.prepare.outputs.metadata }}
270- -
271- name : Inspect image
247+ - name : Inspect image
272248 run : |
273249 # shellcheck disable=SC2046,SC2086
274- docker buildx imagetools inspect $(jq -cr '.target."${{ matrix.target }}-${{ matrix.variant }}".tags | first' <<< ${METADATA})
250+ docker buildx imagetools inspect $(jq -cr '.target."${{ matrix.target }}-${{ matrix.variant }}".tags | first' <<< ${METADATA})
275251 env :
276252 METADATA : ${{ needs.prepare.outputs.metadata }}
0 commit comments