Skip to content

Update lock file

Update lock file #552

Workflow file for this run

# https://github.com/sandhose/nixconf/blob/master/.github/workflows/update.yaml
name: "Update lock file"
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: tibdex/github-app-token@v1.5
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: cachix/install-nix-action@v16
with:
install_url: https://releases.nixos.org/nix/nix-2.6.1/install
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Setup Git author
run: |
git config user.name 'GitHub Ations'
git config user.email 'noreply@github.com'
- name: Update lock file
run: nix flake update --no-use-registries --commit-lock-file
- name: Get commit message
id: commit
run: |
message="$(git log -1 --pretty=%B | tail +3 | awk -f ./.github/flake-to-md.awk)"
message="${message//'%'/'%25'}"
message="${message//$'\n'/'%0A'}"
message="${message//$'\r'/'%0D'}"
echo "::set-output name=message::$message"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: "${{ steps.generate-token.outputs.token }}"
title: "Automated Flake update"
body: "${{ steps.commit.outputs.message }}"
delete-branch: true
assignees: thexyno