mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
ci: replace artifact deletion action with custom script
This commit is contained in:
7
.github/scripts/delete-artifact.sh
vendored
Executable file
7
.github/scripts/delete-artifact.sh
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -xe
|
||||
ARTIFACT_NAME="$1"
|
||||
|
||||
ARTIFACT_ID=$(gh api repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/artifacts --jq ".artifacts[] | select(.name==\"$ARTIFACT_NAME\") | .id")
|
||||
gh api -X DELETE repos/$GITHUB_REPOSITORY/actions/artifacts/$ARTIFACT_ID
|
||||
echo "Deleted artifact $ARTIFACT_NAME with ID $ARTIFACT_ID"
|
||||
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -1303,11 +1303,14 @@ jobs:
|
||||
needs: webassembly-build
|
||||
|
||||
steps:
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🌍 Deploy WebAssembly Build to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
- name: 🗑️ Delete artifact
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: github-pages
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: .github/scripts/delete-artifact.sh github-pages
|
||||
|
||||
Reference in New Issue
Block a user