ci: update env and commands

This commit is contained in:
Gabriel Arazas 2022-08-19 16:39:30 +08:00
parent 57a35230e9
commit 3476e3f7a4
2 changed files with 13 additions and 9 deletions

View File

@ -3,6 +3,13 @@ on:
schedule: schedule:
# Every week on Friday. # Every week on Friday.
- cron: '0 0 * * 5' - cron: '0 0 * * 5'
env:
NIXPKGS_ALLOW_INSECURE: "1"
NIXPKGS_ALLOW_BROKEN: "1"
# GitHub bot
GIT_AUTHOR_NAME: "github-actions[bot]"
GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com"
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -10,21 +17,18 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: cachix/install-nix-action@v16 - uses: cachix/install-nix-action@v16
with: with:
# TODO: This is a terrible idea, pls switch to stable channel at some point.
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
keep-going = true
- name: Update flake inputs - name: Update flake inputs
run: | run: |
nix shell nixpkgs#git
# This is set by the GitHub Actions bot just to make identifying which commits are automated.
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
nix flake update --commit-lock-file \ nix flake update --commit-lock-file \
--commit-lockfile-summary 'flake.lock: update inputs' --commit-lockfile-summary 'flake.lock: update inputs'
- name: Build custom packages - name: Build custom packages
run: nix shell nixpkgs#nix-build-uncached --command nix-build-uncached ./pkgs run: nix build --impure --file ./pkgs
- name: Build NixOS configurations - name: Build NixOS configurations
run: nix build .#nixosConfigurations.ni.config.system.build.toplevel run: nix build --impure .#nixosConfigurations.ni.config.system.build.toplevel
- name: Push updates to remote - name: Push updates to remote
run: | run: |
git remote remove origin git remote remove origin

View File

@ -30,7 +30,7 @@ jobs:
name: foo-dogsquared name: foo-dogsquared
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build custom packages - name: Build custom packages
run: nix shell nixpkgs#nix-build-uncached --command nix-build-uncached ./pkgs --impure run: nix build -f ./pkgs --impure
build-hosts: build-hosts:
runs-on: ubuntu-latest runs-on: ubuntu-latest