Update flake.lock #454
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
update-flakes: | |
name: Update nix flakes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v30 | |
with: | |
extra_nix_config: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Set default git branch (to reduce log spam) | |
run: git config --global init.defaultBranch trunk | |
- name: Update flake.lock | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
nix flake update --commit-lock-file | |
- name: Create archive of repository | |
run: tar cvf archive.tar . | |
- uses: actions/upload-artifact@v4 | |
name: Upload changes into artifacts | |
with: | |
path: archive.tar | |
retention-days: 1 | |
build-check-home: | |
name: "Build home-manager configurations" | |
runs-on: ubuntu-latest | |
needs: update-flakes | |
strategy: | |
matrix: | |
home-user: [ 'kjhoerr', 'khoerr', 'nixos' ] | |
steps: | |
- uses: easimon/maximize-build-space@v10 | |
with: | |
overprovision-lvm: true | |
remove-android: true | |
remove-dotnet: true | |
remove-haskell: true | |
remove-codeql: true | |
remove-docker-images: true | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
- name: Extract archive | |
run: tar xvf archive.tar | |
- uses: cachix/install-nix-action@v30 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
# enable nix-community binary cache | |
trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
substituters = https://nix-community.cachix.org https://cache.nixos.org/ | |
trusted-substituters = https://nix-community.cachix.org https://cache.nixos.org/ | |
nix_path: nixpkgs=channel:nixos-23.11 | |
- name: Build Home-Manager configs | |
run: |- | |
nix build '.#homeConfigurations.${{ matrix.home-user }}.activationPackage' | |
- name: Create GH issue based on workflow failure | |
if: failure() | |
uses: JasonEtco/create-an-issue@v2 | |
with: | |
filename: .github/WORKFLOW_FAILURE.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WORKFLOW_NAME: ${{ github.workflow }} | |
WORKFLOW_JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
build-check-nixos: | |
name: "Build NixOS configurations" | |
runs-on: ubuntu-latest | |
needs: update-flakes | |
strategy: | |
matrix: | |
nixos-system: [ 'ariadne', 'cronos', 'whisker', 'nixos-wsl' ] | |
steps: | |
- uses: easimon/maximize-build-space@v10 | |
with: | |
overprovision-lvm: true | |
remove-android: true | |
remove-dotnet: true | |
remove-haskell: true | |
remove-codeql: true | |
remove-docker-images: true | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
- name: Extract archive | |
run: tar xvf archive.tar | |
- uses: cachix/install-nix-action@v30 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
# enable nix-community binary cache | |
trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | |
substituters = https://nix-community.cachix.org https://cache.nixos.org/ | |
trusted-substituters = https://nix-community.cachix.org https://cache.nixos.org/ | |
nix_path: nixpkgs=channel:nixos-23.11 | |
- name: Build NixOS configs | |
run: |- | |
nix build '.#nixosConfigurations.${{ matrix.nixos-system }}.config.system.build.toplevel' | |
- name: Create GH issue based on workflow failure | |
if: failure() | |
uses: JasonEtco/create-an-issue@v2 | |
with: | |
filename: .github/WORKFLOW_FAILURE.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WORKFLOW_NAME: ${{ github.workflow }} | |
WORKFLOW_JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
create-pr: | |
name: "Create Pull Request for flake updates" | |
runs-on: ubuntu-latest | |
needs: [ build-check-home, build-check-nixos ] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
- name: Extract archive | |
run: tar xvf archive.tar | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
body: | | |
## Run report | |
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
base: trunk | |
branch: flake-updates | |
delete-branch: true | |
title: Update flake.lock | |
name: Update flake.lock | |
on: | |
schedule: | |
- cron: 40 4 * * 0,2,4,6 | |
workflow_dispatch: null |