Skip to content

Instantly share code, notes, and snippets.

@malteneuss
Last active July 22, 2023 08:56
Show Gist options
  • Save malteneuss/c428f44bbfb32ac8b5d90de843d2e24f to your computer and use it in GitHub Desktop.
Save malteneuss/c428f44bbfb32ac8b5d90de843d2e24f to your computer and use it in GitHub Desktop.
Github Action Periodic Bump flake.lock
# after https://github.com/reckenrode/nixos-configs/blob/f61d83e56ed7569c31ca67591bcf7856f1b8ac4a/.github/workflows/main.yml
name: Bump flake.lock
on:
schedule:
- cron: "0 6 * * *"
# Manually
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v20
- run: nix flake update
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Bump flake.lock
branch: main
commit_options: '--no-verify --signoff'
file_pattern: flake.lock
commit_user_name: Flake Bot # defaults to "GitHub Actions"
#commit_user_email: my-github-actions-bot@example.org # defaults to "actions@github.com"
commit_author: Flake Bot <actions@github.com> # defaults to author of the commit that triggered the run
skip_dirty_check: false
skip_fetch: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment