From 942b3c6ec40799b7b8867c5afa847cbc71db40d2 Mon Sep 17 00:00:00 2001 From: John Sudol <24583161+johnsudol@users.noreply.github.com> Date: Mon, 12 Dec 2022 11:19:25 -0500 Subject: [PATCH] Update artifact-tests.yml Back to Node 16, and bring back the custom fix for windows --- .github/workflows/artifact-tests.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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: |