Skip to content

Commit

Permalink
gha: add correlation-id job to installer workflow
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jsliacan committed Dec 14, 2023
1 parent 777da2a commit ce93c23
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ce93c23

Please sign in to comment.