From 0d34edc7f6c7338901e552a751fdc3e5b72a0737 Mon Sep 17 00:00:00 2001 From: iTrooz Date: Mon, 5 Jan 2026 16:25:00 +0100 Subject: [PATCH] ci: replace artifact deletion action with custom script --- .github/scripts/delete-artifact.sh | 7 +++++++ .github/workflows/build.yml | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100755 .github/scripts/delete-artifact.sh diff --git a/.github/scripts/delete-artifact.sh b/.github/scripts/delete-artifact.sh new file mode 100755 index 000000000..b5a867224 --- /dev/null +++ b/.github/scripts/delete-artifact.sh @@ -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" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcf568559..24fb6f34d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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