From 0a0f6677aa7e0c2d8cfa2ce84984d94d6f3f16cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikolai=20R=C3=B8ed=20Kristiansen?= Date: Thu, 18 Sep 2025 21:27:54 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Debug=20matrix=20job=20outputs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/debug-context.yaml | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/debug-context.yaml diff --git a/.github/workflows/debug-context.yaml b/.github/workflows/debug-context.yaml new file mode 100644 index 0000000..e18b14d --- /dev/null +++ b/.github/workflows/debug-context.yaml @@ -0,0 +1,49 @@ +on: + push: + +jobs: + build: + strategy: + matrix: + package: ${{ fromJSON('["a", "b", "c"]') }} + runs-on: ubuntu-latest + steps: + - name: Simulate digest output + id: build + run: | + RAND=$(openssl rand -hex 16) + echo "digest=${RAND}" > $GITHUB_OUTPUT + + - name: Export digest + run: | + mkdir digests/ + digest="${{ steps.build.outputs.digest }}" + echo "${digest#sha256:}" >> "digests/${{ matrix.package }}" + + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digest-${{ matrix.package }} + path: digests/* + if-no-files-found: error + retention-days: 1 + + deploy: + runs-on: ubuntu-latest + needs: [build] + steps: + - name: Download digests + uses: actions/download-artifact@v5 + with: + path: digests + pattern: digest-* + merge-multiple: true + + - name: List digests + run: | + echo "Digests by package:" + for path in digests/*; do + name=$(basename "$path") + echo "$name: $(cat "$path")" + done + echo "🎉🎉🎉"