Skip to content

Commit

Permalink
ci: init auto flake update action
Browse files Browse the repository at this point in the history
  • Loading branch information
ttrssreal committed Dec 29, 2024
1 parent 11ad30a commit 7b54db3
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

name: Update Flake Inputs

on:
workflow_dispatch:
schedule:
# https://crontab.guru/#0_13_*_*_wed
- cron: "0 13 * * wed"

jobs:
build:
runs-on: nix

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Flake update
run: nix flake update

- name: Set Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Git commit
run: |
git add -A
if [[ `git status --porcelain` ]]; then
git commit -m "flake: update inputs"
else
echo "Inputs all up to date"
fi
- name: Create pull request
run: |
gh pr create -H main --title "Bot: flake update" --body "Weekly update :3"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7b54db3

Please sign in to comment.