From ce93c23fdc1915e9886db6cd6fef964054614f95 Mon Sep 17 00:00:00 2001 From: Jakub Sliacan Date: Mon, 4 Dec 2023 20:49:58 +0100 Subject: [PATCH] gha: add correlation-id job to installer workflow We want to keep track of something unique to the trigger-event (that is the same across all actions triggered by that event that particular time). Given that an event triggered a chain of workflows, first workflow in the chain can access the trigger event, but later workflows can't. Saving a correlation-id as artifact will help us keep track of that. --- .github/workflows/windows-installer.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/windows-installer.yml b/.github/workflows/windows-installer.yml index 000aee873a..47361c3abe 100644 --- a/.github/workflows/windows-installer.yml +++ b/.github/workflows/windows-installer.yml @@ -4,7 +4,27 @@ on: branches: - "main" pull_request: {} + jobs: + save-correlation-id: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + + - name: Save the ID number in an artifact + shell: bash + env: + ID: ${{ github.sha }} + run: echo $ID > id.txt + + - name: Upload the ID number + uses: actions/upload-artifact@v3 + with: + name: id + path: ./id.txt + build: runs-on: ${{ matrix.os }} strategy: