Browse Source

chore: fix argos-ci check status in PR (#35193)

* chore: batch upload argos-ci snapshots

* test: added commit and branch back for ui-upload.yml
pull/35192/head
afc163 3 years ago
committed by GitHub
parent
commit
5bb47057b0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      .github/workflows/ui-upload.yml
  2. 30
      .github/workflows/ui.yml
  3. 6
      scripts/argos-upload.js

22
.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: Download branch artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
name: branch
- name: Save branch id
id: branch
run: echo "::set-output name=id::$(<branch.txt)"
- name: Download snapshots artifact
uses: dawidd6/action-download-artifact@v2
with:
@ -39,3 +59,5 @@ jobs:
run: npm run argos
env:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
ARGOS_GITHUB_BRANCH: ${{ steps.branch.outputs.id }}
ARGOS_GITHUB_COMMIT: ${{ steps.commit.outputs.id }}

30
.github/workflows/ui.yml

@ -58,3 +58,33 @@ jobs:
name: snapshots
path: imageSnapshots/
retention-days: 3
- name: Save commit
if: github.event_name == 'pull_request' && github.base_ref == 'master'
run: echo ${{ github.event.pull_request.head.sha }} > ./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

6
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);

Loading…
Cancel
Save