diff --git a/.github/workflows/artifact-tests.yml b/.github/workflows/artifact-tests.yml index b9c4a2db..ad3a9257 100644 --- a/.github/workflows/artifact-tests.yml +++ b/.github/workflows/artifact-tests.yml @@ -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 @@ -58,13 +58,20 @@ jobs: echo ${{ env.non-gzip-artifact-content }} > artifact-path/world.txt 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: |