Skip to content

Commit 4b644da

Browse files
committed
ci: Use YAML anchor and aliases for repeated "Print logs" steps
1 parent a889cd9 commit 4b644da

File tree

1 file changed

+14
-41
lines changed

1 file changed

+14
-41
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ jobs:
117117
with:
118118
dockerfile: ./ci/linux-debian.Dockerfile
119119

120-
- name: Print logs
120+
- &PRINT_LOGS
121+
name: Print logs
121122
uses: ./.github/actions/print-logs
122123
if: ${{ !cancelled() }}
123124

@@ -151,9 +152,7 @@ jobs:
151152
with:
152153
dockerfile: ./ci/linux-debian.Dockerfile
153154

154-
- name: Print logs
155-
uses: ./.github/actions/print-logs
156-
if: ${{ !cancelled() }}
155+
- *PRINT_LOGS
157156

158157
s390x_debian:
159158
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
@@ -181,10 +180,7 @@ jobs:
181180
with:
182181
dockerfile: ./ci/linux-debian.Dockerfile
183182

184-
- name: Print logs
185-
uses: ./.github/actions/print-logs
186-
if: ${{ !cancelled() }}
187-
183+
- *PRINT_LOGS
188184

189185
arm32_debian:
190186
name: "ARM32: Linux (Debian stable, QEMU)"
@@ -220,9 +216,7 @@ jobs:
220216
with:
221217
dockerfile: ./ci/linux-debian.Dockerfile
222218

223-
- name: Print logs
224-
uses: ./.github/actions/print-logs
225-
if: ${{ !cancelled() }}
219+
- *PRINT_LOGS
226220

227221
arm64-debian:
228222
name: "arm64: Linux (Debian stable)"
@@ -258,9 +252,7 @@ jobs:
258252
with:
259253
dockerfile: ./ci/linux-debian.Dockerfile
260254

261-
- name: Print logs
262-
uses: ./.github/actions/print-logs
263-
if: ${{ !cancelled() }}
255+
- *PRINT_LOGS
264256

265257
ppc64le_debian:
266258
name: "ppc64le: Linux (Debian stable, QEMU)"
@@ -288,10 +280,7 @@ jobs:
288280
with:
289281
dockerfile: ./ci/linux-debian.Dockerfile
290282

291-
- name: Print logs
292-
uses: ./.github/actions/print-logs
293-
if: ${{ !cancelled() }}
294-
283+
- *PRINT_LOGS
295284

296285
valgrind_debian:
297286
name: "Valgrind ${{ matrix.binary_arch }} (memcheck)"
@@ -343,9 +332,7 @@ jobs:
343332
with:
344333
dockerfile: ./ci/linux-debian.Dockerfile
345334

346-
- name: Print logs
347-
uses: ./.github/actions/print-logs
348-
if: ${{ !cancelled() }}
335+
- *PRINT_LOGS
349336

350337
sanitizers_debian:
351338
name: "UBSan, ASan, LSan"
@@ -385,9 +372,7 @@ jobs:
385372
with:
386373
dockerfile: ./ci/linux-debian.Dockerfile
387374

388-
- name: Print logs
389-
uses: ./.github/actions/print-logs
390-
if: ${{ !cancelled() }}
375+
- *PRINT_LOGS
391376

392377
msan_debian:
393378
name: "MSan"
@@ -434,10 +419,7 @@ jobs:
434419
with:
435420
dockerfile: ./ci/linux-debian.Dockerfile
436421

437-
- name: Print logs
438-
uses: ./.github/actions/print-logs
439-
if: ${{ !cancelled() }}
440-
422+
- *PRINT_LOGS
441423

442424
mingw_debian:
443425
name: ${{ matrix.configuration.job_name }}
@@ -475,9 +457,7 @@ jobs:
475457
with:
476458
dockerfile: ./ci/linux-debian.Dockerfile
477459

478-
- name: Print logs
479-
uses: ./.github/actions/print-logs
480-
if: ${{ !cancelled() }}
460+
- *PRINT_LOGS
481461

482462
x86_64-macos-native:
483463
name: "x86_64: macOS Ventura, Valgrind"
@@ -526,9 +506,7 @@ jobs:
526506
python3 -m pip install lief
527507
python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
528508
529-
- name: Print logs
530-
uses: ./.github/actions/print-logs
531-
if: ${{ !cancelled() }}
509+
- *PRINT_LOGS
532510

533511
arm64-macos-native:
534512
name: "ARM64: macOS Sonoma"
@@ -578,10 +556,7 @@ jobs:
578556
python3 -m pip install lief
579557
python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
580558
581-
- name: Print logs
582-
uses: ./.github/actions/print-logs
583-
if: ${{ !cancelled() }}
584-
559+
- *PRINT_LOGS
585560

586561
win64-native:
587562
name: ${{ matrix.configuration.job_name }}
@@ -685,9 +660,7 @@ jobs:
685660
with:
686661
dockerfile: ./ci/linux-debian.Dockerfile
687662

688-
- name: Print logs
689-
uses: ./.github/actions/print-logs
690-
if: ${{ !cancelled() }}
663+
- *PRINT_LOGS
691664

692665
cxx_headers_debian:
693666
name: "C++ (public headers)"

0 commit comments

Comments
 (0)