Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 13894e09c7 | |||
| bd5d810f57 |
@@ -24,10 +24,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set Node.js 14.x
|
- name: Set Node.js 16.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14.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
|
# 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
|
# node context. This runs a local action that gets and sets the necessary env variables that are needed
|
||||||
@@ -59,6 +59,13 @@ jobs:
|
|||||||
echo ${{ env.gzip-artifact-content }} > artifact-path/gzip.txt
|
echo ${{ env.gzip-artifact-content }} > artifact-path/gzip.txt
|
||||||
touch artifact-path/empty.txt
|
touch artifact-path/empty.txt
|
||||||
|
|
||||||
|
- name: Add additional logging after create
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cat ./artifact-path/world.txt
|
||||||
|
cat ./artifact-path/gzip.txt
|
||||||
|
cat ./artifact-path/empty.txt
|
||||||
|
|
||||||
# We're using node -e to call the functions directly available in the @actions/artifact package
|
# We're using node -e to call the functions directly available in the @actions/artifact package
|
||||||
- name: Upload artifacts using uploadArtifact()
|
- name: Upload artifacts using uploadArtifact()
|
||||||
run: |
|
run: |
|
||||||
@@ -75,6 +82,13 @@ jobs:
|
|||||||
mkdir artifact-3-directory
|
mkdir artifact-3-directory
|
||||||
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().downloadArtifact('my-artifact-3','artifact-3-directory'))"
|
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().downloadArtifact('my-artifact-3','artifact-3-directory'))"
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
- name: Verify downloadArtifact()
|
- name: Verify downloadArtifact()
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user