Skip to content

Commit 6872b37

Browse files
committed
πŸ‘· Debug matrix job outputs
1 parent 61b1af1 commit 6872b37

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
push:
3+
4+
jobs:
5+
build:
6+
strategy:
7+
matrix:
8+
package: ${{ fromJSON('["a", "b", "c"]') }}
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Simulate digest output
12+
id: build
13+
run: |
14+
RAND=$(openssl rand -hex 16)
15+
echo "digest=${RAND}" > $GITHUB_OUTPUT
16+
17+
- name: Export digest
18+
run: |
19+
mkdir -p ${{ runner.temp }}/digests/
20+
digest="${{ steps.build.outputs.digest }}"
21+
echo "${digest#sha256:}" >> "${{ runner.temp }}/digests/${{ matrix.package }}"
22+
23+
- name: Upload digest
24+
uses: actions/upload-artifact@v4
25+
with:
26+
name: digest-${{ matrix.package }}
27+
path: ${{ runner.temp }}/digests/*
28+
if-no-files-found: error
29+
retention-days: 1
30+
31+
deploy:
32+
runs-on: ubuntu-latest
33+
needs: [build]
34+
steps:
35+
- name: Download digests
36+
uses: actions/download-artifact@v5
37+
with:
38+
path: ${{ runner.temp }}/digests
39+
pattern: digest-*
40+
merge-multiple: true
41+
42+
- name: List digests
43+
run: |
44+
echo "Digests by package:"
45+
for path in ${{ runner.temp }}/digests/*; do
46+
name=$(basename "$path")
47+
echo "$name: $(cat "$path")"
48+
done
49+
echo "πŸŽ‰πŸŽ‰πŸŽ‰"

0 commit comments

Comments
Β (0)