mirror of https://github.com/actions/toolkit
Update artifact-tests.yml
Back to Node 16, and bring back the custom fix for windowspull/1258/head
parent
31d5189ce1
commit
942b3c6ec4
|
@ -24,10 +24,10 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set Node.js 18.x
|
||||
- name: Set Node.js 16.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
node-version: 16.x
|
||||
|
||||
# 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
|
||||
|
@ -59,12 +59,19 @@ jobs:
|
|||
echo ${{ env.gzip-artifact-content }} > artifact-path/gzip.txt
|
||||
touch artifact-path/empty.txt
|
||||
|
||||
- name: Add additional logging
|
||||
shell: bash
|
||||
run: |
|
||||
cat ./artifact-1-directory/artifact-path/world.txt
|
||||
cat ./artifact-2-directory/artifact-path/gzip.txt
|
||||
cat ./artifact-3-directory/artifact-path/empty.txt
|
||||
|
||||
# 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-client').create().uploadArtifact('my-artifact-1',['artifact-path/world.txt'], '${{ github.workspace }}'))"
|
||||
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-2',['artifact-path/gzip.txt'], '${{ github.workspace }}'))"
|
||||
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-3',['artifact-path/empty.txt'], '${{ github.workspace }}'))"
|
||||
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-1',['artifact-path/world.txt'], process.argv[1]))" "${{ github.workspace }}"
|
||||
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-2',['artifact-path/gzip.txt'], process.argv[1]))" "${{ github.workspace }}"
|
||||
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-3',['artifact-path/empty.txt'], process.argv[1]))" "${{ github.workspace }}"
|
||||
|
||||
- name: Download artifacts using downloadArtifact()
|
||||
run: |
|
||||
|
@ -82,7 +89,6 @@ jobs:
|
|||
cat ./artifact-2-directory/artifact-path/gzip.txt
|
||||
cat ./artifact-3-directory/artifact-path/empty.txt
|
||||
|
||||
|
||||
- name: Verify downloadArtifact()
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
Loading…
Reference in New Issue