flake-checker/.github/workflows/allowed-refs.yaml

37 lines
1.1 KiB
YAML
Raw Normal View History

2023-08-26 18:54:28 +03:00
name: Check that allowed refs are up to date
2023-08-26 18:28:24 +03:00
on:
schedule:
2023-08-26 18:56:11 +03:00
- cron: "0 0 * * *" # Daily
2023-08-26 18:28:24 +03:00
jobs:
check-allowed-refs:
runs-on: ubuntu-22.04
steps:
2024-05-16 17:33:45 +03:00
- uses: actions/checkout@v4
2023-08-26 18:28:24 +03:00
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check allowed refs
run: |
2023-08-28 00:43:12 +03:00
nix develop --command cargo run --features allowed-refs -- --check-allowed-refs
2024-04-29 02:09:46 +03:00
- name: Update allowed-refs.json
if: failure()
run: |
allowed_refs_json=$(nix develop --command cargo run --features allowed-refs -- --get-allowed-refs | jq .)
echo "${allowed_refs_json}" > allowed-refs.json
- name: Create pull request
if: failure()
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update allowed-refs.json to new valid Git refs list
title: Update allowed-refs.json
body: |
Nixpkgs has changed its list of maintained references. This PR updates `allowed-refs.json` to reflect that change.
branch: updated-allowed-refs
base: main