Check that ref statuses are up to date #346
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check that ref statuses are up to date | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # Daily | |
| jobs: | |
| check-ref-statuses: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: DeterminateSystems/determinate-nix-action@main | |
| - uses: DeterminateSystems/flakehub-cache-action@main | |
| - name: Check ref statuses | |
| run: | | |
| nix develop --command cargo run --features ref-statuses -- --check-ref-statuses | |
| - name: Update ref-statuses.json | |
| if: failure() | |
| run: | | |
| ref_statuses_json=$(nix develop --command cargo run --features ref-statuses -- --get-ref-statuses | jq --sort-keys .) | |
| echo "${ref_statuses_json}" > ref-statuses.json | |
| - name: Update README in light of new list | |
| if: failure() | |
| run: | | |
| nix develop --command update-readme | |
| - name: Create pull request | |
| if: failure() | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| commit-message: Update ref-statuses.json to new valid Git refs list and update README | |
| title: Update ref-statuses.json | |
| body: | | |
| Nixpkgs has changed its list of maintained references. This PR updates `ref-statuses.json` to reflect that change. | |
| branch: updated-ref-statuses | |
| base: main |