Skip to content

Instantly share code, notes, and snippets.

@malteneuss
Last active July 22, 2023 08:56
Show Gist options
  • Select an option

  • Save malteneuss/c428f44bbfb32ac8b5d90de843d2e24f to your computer and use it in GitHub Desktop.

Select an option

Save malteneuss/c428f44bbfb32ac8b5d90de843d2e24f to your computer and use it in GitHub Desktop.

Revisions

  1. malteneuss revised this gist Jul 22, 2023. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions github-action-periodic-bump-flake-lock.yml
    Original file line number Diff line number Diff line change
    @@ -4,20 +4,24 @@ 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
  2. malteneuss created this gist Jul 9, 2023.
    33 changes: 33 additions & 0 deletions github-action-periodic-bump-flake-lock.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    # after https://github.com/reckenrode/nixos-configs/blob/f61d83e56ed7569c31ca67591bcf7856f1b8ac4a/.github/workflows/main.yml
    name: Bump flake.lock

    on:
    schedule:
    - cron: "0 6 * * *"

    workflow_dispatch:

    jobs:
    build:
    runs-on: ubuntu-latest

    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: [email protected] # defaults to "[email protected]"
    commit_author: Flake Bot <[email protected]> # defaults to author of the commit that triggered the run
    skip_dirty_check: false
    skip_fetch: true