Skip to content

update-flake-packages #2

update-flake-packages

update-flake-packages #2

name: update-flake-packages
on:
workflow_dispatch:
repository_dispatch:
types: [update-flake-packages]
schedule:
- cron: '0 4 * * 0'
permissions:
contents: write
pull-requests: write
jobs:
packages:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Copy nixpkgs scripts
run: |
NIXPKGS=$(nix-instantiate --eval -E '<nixpkgs>')
cp -r $NIXPKGS/maintainers .
chmod -R +w .
sed -i "s|./../../default.nix|$NIXPKGS|g" maintainers/scripts/update.nix
- name: Update flake packages
id: update
uses: gepbird/nix-update-action@v2.1.1
with:
token: ${{ secrets.WORKFLOW_PR_TOKEN }}
# Ensure all *-firmwares are on the blacklist.
blacklist: default,pico-fido-firmwares,pico-openpgp-firmwares,pico-fido2-fimrwares
pr-body: |
Automated changes by the [nix-update-actions](https://github.com/gepbird/nix-update-action) GitHub Action.
pr-labels: "automated"
- name: Print PR number
run: echo Pull request number is ${{ steps.update.outputs.pull-request-number }}.