File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 pull_request :
66
7+ permissions :
8+ contents : read
9+ actions : read
10+
711jobs :
812 composer :
913 runs-on : ubuntu-latest
3438 with :
3539 name : build-artifact-${{ matrix.php }}
3640 path : /tmp/github-actions
41+ retention-days : 1
3742
3843# phpunit:
3944# runs-on: ubuntu-latest
@@ -163,21 +168,3 @@ jobs:
163168 php_version : ${{ matrix.php }}
164169 path : src/
165170 standard : phpcs.xml
166-
167- remove_old_artifacts :
168- runs-on : ubuntu-latest
169-
170- permissions :
171- actions : write
172-
173- steps :
174- - name : Remove old artifacts for prior workflow runs on this repository
175- env :
176- GH_TOKEN : ${{ github.token }}
177- run : |
178- gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
179- while read id
180- do
181- echo -n "Deleting artifact ID $id ... "
182- gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
183- done <artifact-id-list.txt
You can’t perform that action at this time.
0 commit comments