Shrink flake-updating action (#193)

This commit is contained in:
Patrick Stevens
2024-07-12 19:44:13 +01:00
committed by GitHub
parent b7a240bbb9
commit 31bd9e22f2
3 changed files with 7 additions and 177 deletions

View File

@@ -2,6 +2,8 @@
name: Weekly Nix Flake Update
on:
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * 0' # Runs at 00:00 every Sunday
workflow_dispatch: # Allows manual triggering
@@ -41,15 +43,12 @@ jobs:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Prepare to create commit
run: python -m venv /tmp/venv && /tmp/venv/bin/python -m pip install -r .github/workflows/requirements.txt
- name: Create pull request
- name: Raise pull request
uses: Smaug123/commit-action@cc25e6d80a796c49669dda4a0aa36c54c573983d
id: cpr
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
BEARER_TOKEN: ${{ steps.generate-token.outputs.token }}
run: /tmp/venv/bin/python .github/workflows/commit.py
with:
bearer-token: ${{ steps.generate-token.outputs.token }}
pr-title: "Upgrade Nix flake and deps"
- name: Enable Pull Request Automerge
if: ${{ steps.cpr.outputs.pull-request-number }}