Parallelize automated updates
This commit is contained in:
parent
46ba8d6cf4
commit
4bd59d121f
2 changed files with 39 additions and 12 deletions
2
.github/workflows/cachix.yml
vendored
2
.github/workflows/cachix.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
||||||
- urithiru
|
- urithiru
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v18
|
- uses: cachix/install-nix-action@25d64bbf11b34ad6443b4169002d4a1b163a4b02
|
||||||
with:
|
with:
|
||||||
github_access_token: '${{ secrets.GITHUB_TOKEN }}'
|
github_access_token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
- name: Cachix
|
- name: Cachix
|
||||||
|
|
49
.github/workflows/update.yml
vendored
49
.github/workflows/update.yml
vendored
|
@ -6,11 +6,36 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update:
|
flake-update:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v18
|
- uses: cachix/install-nix-action@25d64bbf11b34ad6443b4169002d4a1b163a4b02
|
||||||
|
with:
|
||||||
|
github_access_token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
- run: nix flake update
|
||||||
|
- name: Upload change flake.lock
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: flake.lock
|
||||||
|
path: flake.lock
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: flake-update
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
host:
|
||||||
|
- kharbranth
|
||||||
|
- kholinar
|
||||||
|
- lasting-integrity
|
||||||
|
- urithiru
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Download changed flake.lock
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: flake.lock
|
||||||
|
- uses: cachix/install-nix-action@25d64bbf11b34ad6443b4169002d4a1b163a4b02
|
||||||
with:
|
with:
|
||||||
github_access_token: '${{ secrets.GITHUB_TOKEN }}'
|
github_access_token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
- name: Cachix
|
- name: Cachix
|
||||||
|
@ -20,15 +45,17 @@ jobs:
|
||||||
extraPullNames: "nix-community,accentor"
|
extraPullNames: "nix-community,accentor"
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
skipPush: true
|
skipPush: true
|
||||||
- run: nix flake update
|
- run: nix build -L --no-link .#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel
|
||||||
- run: nix build -L --no-link .#nixosConfigurations.lasting-integrity.config.system.build.toplevel
|
- run: nix eval --json ".#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel.outPath" | sed 's/"\(.*\)"/\1/' | cachix push chvp
|
||||||
- run: nix eval --json ".#nixosConfigurations.lasting-integrity.config.system.build.toplevel.outPath" | sed 's/"\(.*\)"/\1/' | cachix push chvp
|
commit:
|
||||||
- run: nix build -L --no-link .#nixosConfigurations.urithiru.config.system.build.toplevel
|
runs-on: ubuntu-latest
|
||||||
- run: nix eval --json ".#nixosConfigurations.urithiru.config.system.build.toplevel.outPath" | sed 's/"\(.*\)"/\1/' | cachix push chvp
|
needs: build
|
||||||
- run: nix build -L --no-link .#nixosConfigurations.kharbranth.config.system.build.toplevel
|
steps:
|
||||||
- run: nix eval --json ".#nixosConfigurations.kharbranth.config.system.build.toplevel.outPath" | sed 's/"\(.*\)"/\1/' | cachix push chvp
|
- uses: actions/checkout@v3
|
||||||
- run: nix build -L --no-link .#nixosConfigurations.kholinar.config.system.build.toplevel
|
- name: Download changed flake.lock
|
||||||
- run: nix eval --json ".#nixosConfigurations.kholinar.config.system.build.toplevel.outPath" | sed 's/"\(.*\)"/\1/' | cachix push chvp
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: flake.lock
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4.16.0
|
- uses: stefanzweifel/git-auto-commit-action@v4.16.0
|
||||||
with:
|
with:
|
||||||
commit_message: "Update dependencies"
|
commit_message: "Update dependencies"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue