diff --git a/.github/workflows/ui-upload.yml b/.github/workflows/ui-upload.yml index 107b931e94..f2470f4dc4 100644 --- a/.github/workflows/ui-upload.yml +++ b/.github/workflows/ui-upload.yml @@ -23,6 +23,26 @@ jobs: - name: checkout uses: actions/checkout@v3 + - name: Download commit artifact + uses: dawidd6/action-download-artifact@v2 + with: + workflow: ${{ github.event.workflow_run.workflow_id }} + name: commit + + - name: Save commit id + id: commit + run: echo "::set-output name=id::$( ./commit.txt + + - name: Save commit + if: github.event_name == 'push' + run: echo ${{ github.sha }} > ./commit.txt + + - name: Upload commit + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: commit + path: ./commit.txt + + - name: Save branch + if: github.event_name == 'pull_request' && github.base_ref == 'master' + run: echo pull/${{ github.event.pull_request.number }}/merge > ./branch.txt + + - name: Save branch + if: github.event_name == 'push' + run: echo ${GITHUB_REF##*/} > ./branch.txt + + - name: Upload branch + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: branch + path: ./branch.txt diff --git a/scripts/argos-upload.js b/scripts/argos-upload.js index f81158d795..5276a9d0f7 100644 --- a/scripts/argos-upload.js +++ b/scripts/argos-upload.js @@ -47,11 +47,11 @@ async function run() { '--batchCount', chunks.length, '--branch', - process.env.GITHUB_REF_NAME, + process.env.ARGOS_GITHUB_BRANCH, '--commit', - process.env.GITHUB_SHA, + process.env.ARGOS_GITHUB_COMMIT, '--external-build-id', - process.env.GITHUB_SHA, + process.env.ARGOS_GITHUB_COMMIT, ]); // eslint-disable-next-line no-console -- pipe stdout console.log(argosResults.stdout);