Bumps [DeterminateSystems/determinate-nix-action](https://github.com/determinatesystems/determinate-nix-action) from 3.21.1 to 3.21.2.
- [Release notes](https://github.com/determinatesystems/determinate-nix-action/releases)
- [Commits](9adf02b41c...629b284231)
---
updated-dependencies:
- dependency-name: DeterminateSystems/determinate-nix-action
dependency-version: 3.21.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
66 lines
2 KiB
YAML
66 lines
2 KiB
YAML
name: "Update flake.lock"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
update-flake-lock:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Mint flake update token
|
|
id: flake-token
|
|
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
|
|
with:
|
|
app-id: ${{ secrets.FLAKE_UPDATE_APP_ID }}
|
|
private-key: ${{ secrets.FLAKE_UPDATE_APP_PRIVATE_KEY }}
|
|
owner: gastownhall
|
|
repositories: beads
|
|
permission-contents: write
|
|
permission-pull-requests: write
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
|
|
with:
|
|
ref: main
|
|
token: ${{ steps.flake-token.outputs.token }}
|
|
|
|
- name: Install Nix
|
|
uses: DeterminateSystems/determinate-nix-action@629b284231c2a82554b724e357e47fc6020833c8 # v3
|
|
|
|
- name: Update flake.lock
|
|
run: nix flake update
|
|
|
|
- name: Verify update scope
|
|
run: |
|
|
changed_files="$(git diff --name-only)"
|
|
untracked_files="$(git ls-files --others --exclude-standard)"
|
|
|
|
if [ -n "$untracked_files" ]; then
|
|
echo "Unexpected untracked files:"
|
|
echo "$untracked_files"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -n "$changed_files" ] && [ "$changed_files" != "flake.lock" ]; then
|
|
echo "Unexpected changed files:"
|
|
echo "$changed_files"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Create pull request
|
|
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
|
with:
|
|
token: ${{ steps.flake-token.outputs.token }}
|
|
commit-message: "flake.lock: Update"
|
|
base: main
|
|
branch: update_flake_lock_action
|
|
delete-branch: true
|
|
add-paths: flake.lock
|
|
title: "chore(nix): update flake.lock"
|
|
body: |
|
|
Automated flake.lock update generated by the scheduled Nix workflow.
|