Skip to content

Automated update

Automated update #159

Workflow file for this run

name: Automated update
on:
workflow_dispatch: # Allows triggering manually
schedule:
- cron: '47 14 * * 1' # runs every Monday at 14:47 UTC (chosen somewhat randomly)
pull_request:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: repo
- uses: cachix/install-nix-action@V27
- name: Run update script
run: |
nix-build repo -A autoPrUpdate
result/bin/auto-pr-update repo > body
env:
GH_TOKEN: ${{ github.token }}
- name: Output result
if: ${{ github.event_name == 'pull_request' }}
run: |
{
cat body
echo ""
echo '```diff'
git -C repo diff
echo '```'
} > $GITHUB_STEP_SUMMARY
- name: Create Pull Request
if: ${{ github.event_name != 'pull_request' }}
uses: peter-evans/create-pull-request@v6
with:
# To trigger CI for automated PRs, we use a separate machine account
# See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
# and https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#push-pull-request-branches-to-a-fork
token: ${{ secrets.MACHINE_USER_PAT }}
path: repo
push-to-fork: infinixbot/nixpkgs-check-by-name
committer: infinixbot <infinixbot@infinisil.com>
author: infinixbot <infinixbot@infinisil.com>
commit-message: "Automated update"
branch: auto-update
title: "Automated update"
body-path: body