Skip to content

Commit 834d205

Browse files
author
Greg Bowler
committed
ci: remove old artifacts
1 parent fea0d65 commit 834d205

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,17 @@ jobs:
159159
path: src/
160160
standard: phpcs.xml
161161

162-
# TODO: Figure this one out:
163-
# remove_old_artifacts:
164-
# runs-on: ubuntu-latest
165-
#
166-
# steps:
167-
# - name: Remove old artifacts for prior workflow runs on this repository
168-
# env:
169-
# GH_TOKEN: ${{ github.token }}
170-
# run: |
171-
# gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
172-
# while read id
173-
# do
174-
# echo -n "Deleting artifact ID $id ... "
175-
# gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
176-
# done <artifact-id-list.txt
162+
remove_old_artifacts:
163+
runs-on: ubuntu-latest
164+
165+
steps:
166+
- name: Remove old artifacts for prior workflow runs on this repository
167+
env:
168+
GH_TOKEN: ${{ github.token }}
169+
run: |
170+
gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
171+
while read id
172+
do
173+
echo -n "Deleting artifact ID $id ... "
174+
gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
175+
done <artifact-id-list.txt

0 commit comments

Comments
 (0)