diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d9ae96..aaaeb0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,10 @@ on: push: pull_request: +permissions: + contents: read + actions: read + jobs: composer: runs-on: ubuntu-latest @@ -34,6 +38,7 @@ jobs: with: name: build-artifact-${{ matrix.php }} path: /tmp/github-actions + retention-days: 1 phpunit: runs-on: ubuntu-latest @@ -163,21 +168,3 @@ jobs: php_version: ${{ matrix.php }} path: src/ standard: phpcs.xml - - remove_old_artifacts: - runs-on: ubuntu-latest - - permissions: - actions: write - - steps: - - name: Remove old artifacts for prior workflow runs on this repository - env: - GH_TOKEN: ${{ github.token }} - run: | - gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt - while read id - do - echo -n "Deleting artifact ID $id ... " - gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done" - done