nixpkgs-update #628
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: "Build packages on staging" | |
on: | |
repository_dispatch: | |
types: [nixpkgs-update] | |
jobs: | |
gather-hosts: | |
runs-on: ubuntu-latest | |
outputs: | |
hosts: ${{ steps.hosts.outputs.hosts }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v26 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
install_url: https://releases.nixos.org/nix/nix-2.18.2/install | |
- id: hosts | |
run: echo hosts=$(nix eval --impure --json --expr "with builtins.getFlake (toString ./.); builtins.attrNames nixosConfigurations") > $GITHUB_OUTPUT | |
build-pkgs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v26 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
install_url: https://releases.nixos.org/nix/nix-2.18.2/install | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: vlaci | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
- run: rm -rf /opt/hostedtoolcache | |
- run: nix flake lock --override-input nixpkgs github:vlaci/nixpkgs/staging | |
- run: nix run nixpkgs\#just -- build-pkgs | |
build-hosts: | |
needs: | |
- build-pkgs | |
- gather-hosts | |
strategy: | |
max-parallel: 1 | |
matrix: | |
host: ${{ fromJSON(needs.gather-hosts.outputs.hosts) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v26 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
install_url: https://releases.nixos.org/nix/nix-2.18.2/install | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: vlaci | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
- run: rm -rf /opt/hostedtoolcache | |
- run: nix flake lock --override-input nixpkgs github:vlaci/nixpkgs/staging | |
- run: nix run nixpkgs\#just -- build-host "${{ matrix.host }}" | |
trigger: | |
needs: | |
- build-hosts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
repository: vlaci/nixpkgs | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
event-type: nixpkgs-update-ok |