nixos-config/.github/workflows/update.yml

35 lines
1.4 KiB
YAML
Raw Normal View History

2022-11-16 15:36:45 +00:00
name: update
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: "49 7 * * *"
jobs:
flake-lock:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
2023-01-24 12:41:35 +00:00
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg= hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs= chir-rs:AnwyFacopHSkprD6aXY4/R3J9JYzTbV2rosJCBPaB28=
2022-11-16 15:36:45 +00:00
experimental-features = nix-command flakes ca-derivations
post-build-hook = ${{ github.workspace }}/scripts/post-build-hook
2023-01-24 12:41:35 +00:00
substituters = https://cache.nixos.org/ https://attic.chir.rs/chir-rs
substituters = https://cache.nixos.org/
2022-11-16 15:36:45 +00:00
- name: Set up secrets
run: |
echo "$NIX_CACHE_KEY" > ~/cache.key
sudo mkdir /root/.aws
echo "$AWS_CREDENTIALS" | sudo tee /root/.aws/credentials > /dev/null
env:
NIX_CACHE_KEY: ${{secrets.NIX_CACHE_KEY}}
AWS_CREDENTIALS: ${{secrets.AWS_CREDENTIALS}}
- name: Update flake.lock
2022-11-16 15:52:02 +00:00
uses: DeterminateSystems/update-flake-lock@v14
2022-11-16 15:36:45 +00:00
with:
token: ${{ secrets.GH_TOKEN }}