Skip to content

Nix Flake Builds

Nix Flake Builds #17

Workflow file for this run

name: nix flake update
on:
schedule:
- cron: "30 */6 * * *"
push:
branches: [main]
jobs:
update-lockfile:
permissions:
contents: write
actions: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Nix
uses: cachix/install-nix-action@v14
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update flake
run: |
nix flake update
nix flake metadata
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add flake.lock
git commit -m "Update flake.lock" || echo "No changes to commit"
git push
build:
needs: [update-lockfile]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Nix
uses: cachix/install-nix-action@v14
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- run: nix flake metadata
- run: |
echo working on it soon!