1
0
Fork 0

Unique artifact name

pull/1497/head
Konrad Pabjan 2023-08-17 11:23:52 -04:00
parent 81c63b90bb
commit 35f5099d33
1 changed files with 1 additions and 12 deletions

View File

@ -31,22 +31,11 @@ jobs:
with:
node-version: 16.x
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
# In order to upload & download artifacts from a shell script, certain env variables need to be set that are only available in the
# node context. This runs a local action that gets and sets the necessary env variables that are needed
- name: Set env variables
uses: ./packages/artifact/__tests__/ci-test-action/
- name: Dump GitHub context again
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
# Need root node_modules because certain npm packages like jest are configured for the entire repository and it won't be possible
# without these to just compile the artifacts package
- name: Install root npm packages
@ -73,7 +62,7 @@ jobs:
# We're using node -e to call the functions directly available in the @actions/artifact package
- name: Upload artifacts using uploadArtifact()
run: |
node -e "Promise.resolve(require('./packages/artifact/lib/artifact').create().uploadArtifact('my-artifact',['artifact-path/first.txt','artifact-path/second.txt'], process.argv[1]))" "${{ github.workspace }}"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact').create().uploadArtifact('my-artifact$-{{ matrix.runs-on }}',['artifact-path/first.txt','artifact-path/second.txt'], process.argv[1]))" "${{ github.workspace }}"