File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2651,14 +2651,23 @@ jobs:
26512651 steps :
26522652
26532653 - name : Delete Workspace Artifact
2654- uses : geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
2655- with :
2656- name : build.tar.zst
2657- useGlob : false
2654+ run : |
2655+ ARTIFACT_ID=$(gh api /repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts --jq ".artifacts[] | select(.name == \"${NAME}\") | .id")
2656+ echo ${ARTIFACT_ID}
2657+ if [ -n "$ARTIFACT_ID" ]; then
2658+ gh api /repos/${GITHUB_REPOSITORY}/actions/artifacts/${ARTIFACT_ID} -X DELETE
2659+ fi
2660+ env :
2661+ GH_TOKEN : ${{ github.token }}
2662+ NAME : build.tar.zst
26582663
26592664 - name : Delete Dev Build Artifact
2660- uses : geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
26612665 if : ${{ contains(github.event.pull_request.labels.*.name, 'ci:dev-build') && cancelled() }}
2662- with :
2663- name : dev-build_${{github.event.pull_request.number || github.run_id}}.zip
2664- useGlob : false
2666+ run : |
2667+ ARTIFACT_ID=$(gh api /repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts --jq ".artifacts[] | select(.name == \"${NAME}\") | .id")
2668+ if [ -n "$ARTIFACT_ID" ]; then
2669+ gh api /repos/${GITHUB_REPOSITORY}/actions/artifacts/${ARTIFACT_ID} -X DELETE
2670+ fi
2671+ env :
2672+ GH_TOKEN : ${{ github.token }}
2673+ NAME : dev-build_${{github.event.pull_request.number || github.run_id}}.zip
You can’t perform that action at this time.
0 commit comments