lock update #119
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
# SPDX-FileCopyrightText: Andrew Hayzen <[email protected]> | |
# | |
# SPDX-License-Identifier: MPL-2.0 | |
name: lock update | |
on: | |
schedule: | |
# Note this is in UTC | |
# | |
# 2200 is 0700 in Japan and 2200 or 2300 in UK so has minimal impact | |
- cron: '1 22 * * *' | |
workflow_dispatch: | |
jobs: | |
lock-updater: | |
name: nix flake update | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/[email protected] | |
- uses: DeterminateSystems/nix-installer-action@v12 | |
# Github action workflows can't trigger another workflow | |
# so we need to have a different token to do this | |
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs | |
# | |
# Using a Github app allows us a token limited to this repo | |
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens | |
- uses: actions/[email protected] | |
id: generate-token | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- uses: DeterminateSystems/update-flake-lock@v23 | |
with: | |
pr-title: "chore: update flake.lock" | |
pr-body: | | |
Automated changes by the [update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) GitHub Action. | |
``` | |
{{ env.GIT_COMMIT_MESSAGE }} | |
``` | |
token: ${{ steps.generate-token.outputs.token }} |