update #33
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
name: update | |
on: | |
schedule: | |
- cron: '0 2 * * 6' | |
workflow_dispatch: | |
jobs: | |
update: | |
name: Update flake inputs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{ secrets.PR_CREATE_KEY }} | |
- uses: cachix/install-nix-action@v30 | |
with: | |
github_access_token: ${{ secrets.CI_BOT_GH_REPO_TOKEN }} | |
# Used only for things like nix-prefetch-*, which do not yet | |
# seem to universally support flakes | |
nix_path: nixpkgs=channel:nixos-unstable | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_committer_name: Joaqim's GitHub Bot | |
git_committer_email: [email protected] | |
- run: nix flake update --commit-lock-file | |
- run: | | |
echo -e '[keys]\ngithub = "${{ secrets.CI_BOT_GH_REPO_TOKEN }}"' > /tmp/github-key.toml | |
nix run .#commit-nvfetcher -L | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
id: cpr | |
with: | |
branch: bot/update | |
delete-branch: true | |
title: "chore(deps): Update flake inputs" | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: squash |