actions-test/.forgejo/workflows/update-lock.yml
2024-11-07 21:25:04 +01:00

33 lines
841 B
YAML

name: Update flake.lock
on:
workflow_dispatch:
jobs:
update_flake_lock:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Set git config
run: |
git config --global user.name "ukubot"
git config --global user.email "bot@uku.moe"
- name: Update lockfile
id: update_lockfile
run: |
git checkout -b "update-lock-$(date -I)"
nix flake update --commit-lock-file
echo "commits=$(git log --oneline origin/main..HEAD)" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
if: ${{ steps.update_lockfile.outputs.commits }} != ""
run: |
git push origin HEAD
echo EXPLODE