ci: replace artifact deletion action with custom script

This commit is contained in:
iTrooz
2026-01-05 16:25:00 +01:00
parent 63fd61e245
commit 0d34edc7f6
2 changed files with 13 additions and 3 deletions

7
.github/scripts/delete-artifact.sh vendored Executable file
View 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"