diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce8cdd4..f6cb442 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: jobs: check: + permissions: write-all runs-on: ubuntu-latest steps: - name: Checkout @@ -61,6 +62,12 @@ jobs: echo "SHOULD_BUILD=0" >> $GITHUB_OUTPUT fi + - name: Clear older runs + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh run list -L400 --json databaseId -q '.[].databaseId' | tail -n+10 | xargs -IID gh api "repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/ID" -X DELETE || : + outputs: SHOULD_BUILD: ${{ steps.should_build.outputs.SHOULD_BUILD }}