mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
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
This commit is contained in:
parent
a9806a2be0
commit
5bb47057b0
22
.github/workflows/ui-upload.yml
vendored
22
.github/workflows/ui-upload.yml
vendored
@ -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
vendored
30
.github/workflows/ui.yml
vendored
@ -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
|
||||
|
@ -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…
Reference in New Issue
Block a user