Skip to content

Commit

Permalink
fix: update upload artifact workload to have unique ids
Browse files Browse the repository at this point in the history
  • Loading branch information
DanStough committed May 8, 2024
1 parent 10baa43 commit 0b61393
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/reusable-unit-split.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ jobs:
ulimit -Sa
echo "Hard limits"
ulimit -Ha
# upload-artifact requires a unique ID per run. In this case we use a random string rather than trying to do trickery
# with the package matric
- id: generate-matrix-id
run: |
MATRIX_RUN_ID=$(head /dev/urandom | tr -dc A-Z | head -c8)
echo "The matrix run ID is $MATRIX_RUN_ID"
echo "matrix-run-id=$MATRIX_RUN_ID" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
- name: Setup Git
Expand Down Expand Up @@ -167,12 +174,12 @@ jobs:
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: ${{ !cancelled() }}
with:
name: test-results
name: ${{ steps.generate-matrix-id.outputs.matrix-run-id }}-test-results
path: ${{env.TEST_RESULTS}}
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: ${{ !cancelled() }}
with:
name: jsonfile
name: ${{ steps.generate-matrix-id.outputs.matrix-run-id }}-jsonfile
path: /tmp/jsonfile
- name: "Re-run fails report"
if: ${{ !cancelled() }}
Expand Down

0 comments on commit 0b61393

Please sign in to comment.