mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
ci: rename and update 'update' workflow
This commit is contained in:
parent
fd8b5fddec
commit
dd7f3f7579
35
.github/workflows/automate-update.yml
vendored
35
.github/workflows/automate-update.yml
vendored
@ -1,35 +0,0 @@
|
||||
name: "Automated flake inputs update"
|
||||
on:
|
||||
schedule:
|
||||
# Every week on Friday.
|
||||
- cron: '0 0 * * 5'
|
||||
env:
|
||||
NIXPKGS_ALLOW_INSECURE: "1"
|
||||
NIXPKGS_ALLOW_BROKEN: "1"
|
||||
NIXPKGS_ALLOW_UNFREE: "1"
|
||||
|
||||
# GitHub bot
|
||||
GIT_AUTHOR_NAME: "github-actions[bot]"
|
||||
GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
||||
GIT_COMMITTER_NAME: "github-actions[bot]"
|
||||
GIT_COMMITTER_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
- uses: DeterminateSystems/nix-installer-action@v4
|
||||
- name: Update flake inputs
|
||||
run: |
|
||||
nix flake update --commit-lock-file \
|
||||
--commit-lockfile-summary 'flake.lock: update inputs'
|
||||
- name: Build custom packages
|
||||
run: nix build --impure --file ./pkgs
|
||||
- name: Build NixOS configurations
|
||||
run: nix build --impure .#nixosConfigurations.ni.config.system.build.toplevel
|
||||
- name: Push updates to remote
|
||||
run: |
|
||||
git remote remove origin
|
||||
git remote add origin https://${{ secrets.GITHUB_TOKEN }}@github.com/foo-dogsquared/nixos-config.git
|
||||
git push --set-upstream origin master --tags
|
28
.github/workflows/update.yml
vendored
Normal file
28
.github/workflows/update.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
name: "Update flake inputs"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * 5' # Every week on Friday.
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||
- uses: DeterminateSystems/nix-installer-action@v4
|
||||
- name: Update flake inputs
|
||||
run: nix flake update --commit-lock-file --commit-lockfile-summary "flake.lock: update inputs"
|
||||
env:
|
||||
GIT_AUTHOR_NAME: github-actions[bot]
|
||||
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
|
||||
GIT_COMMITTER_NAME: github-actions[bot]
|
||||
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
|
||||
- name: Build custom packages
|
||||
run: nix build --impure --file ./pkgs
|
||||
- name: Build NixOS configurations
|
||||
run: nix build --impure .#images.{ni,plover,bootstrap}
|
||||
- name: Push changes to remote
|
||||
run: |
|
||||
git remote remove origin
|
||||
git remote add origin https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||
git push --set-upstream origin master
|
Loading…
Reference in New Issue
Block a user