Skip to content

Update

Update #64

Workflow file for this run

name: Update
on:
workflow_dispatch:
schedule:
- cron: "20 4 * * *" # "At 04:20."
jobs:
nix-flake-lock:
name: Nix (flake.lock)
runs-on: ubuntu-22.04
permissions:
id-token: write
pull-requests: write
contents: write
steps:
- name: Code checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: master
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@65d7c888b2778e8cf30a07a88422ccb23499bfb8 # v4
- name: Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@8a218f9e264e9c3803c9a1ee1c30d8e4ab55be63 # v2
- name: nix develop .#ci
uses: rrbutani/use-nix-shell-action@59a52b2b9bbfe3cc0e7deb8f9059abe37a439edf # v1.1.0
with:
devShell: .#ci
- name: Configure gitsign
run: |
git config --global commit.gpgsign true # Sign all commits
git config --global tag.gpgsign true # Sign all tags
git config --global gpg.x509.program gitsign # Use gitsign for signing
git config --global gpg.format x509 # gitsign expects x509 args
# Use workflow name as the username
git config --global user.name "${{ github.workflow }}"
# This email identifies the commit as GitHub Actions - see https://github.com/orgs/community/discussions/26560
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: nix flake update
run: |
nix flake update --commit-lock-file --commit-lockfile-summary "nix: update flake.lock"
# This is used to bypass GitHub's restriction on actions that create pull requests not
# triggering any other action runs. I would like for the PR created by this action to
# be ran through our CI checks to ensure it builds correctly before it gets merged.
#
# See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens
# for more information.
- name: Generate GitHub App Token
id: generate-token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create pull request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
token: ${{ steps.generate-token.outputs.token }}
branch: nix-flake-update
commit-message: ""
delete-branch: true
title: "nix: update flake.lock"
labels: dependencies
assignees: matthewpi
reviewers: matthewpi
body: ""