Download the latest fallback-paths.nix #2
This file contains 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: Download the latest fallback-paths.nix | |
on: | |
workflow_dispatch: | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "DeterminateSystems/nix-installer-action@main" | |
- uses: "DeterminateSystems/magic-nix-cache-action@main" | |
- run: | | |
set -eux | |
url=$( | |
nix run https://flakehub.com/f/DeterminateSystems/fh/0.1.9.tar.gz --\ | |
list versions --json NixOS/nix '*' \ | |
| nix run nixpkgs#jq -- -r '.[-1] | "https://releases.nixos.org/nix/nix-" + .version + "/fallback-paths.nix"') | |
curl "$url" > versions.nix | |
git add versions.nix | |
git commit -m "$url" | |
- name: Create PR | |
id: create-pr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
base: main | |
branch: update | |
delete-branch: true | |
token: ${{ github.token }} |