Skip to content

Commit

Permalink
Automate updating lockfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
archigup committed Jan 17, 2025
1 parent b4dffa9 commit 6499283
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Automatic updates

on:
schedule:
- cron: "0 12 ? * WED"
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
update-lockfiles:
name: Update lockfiles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@master
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Switch branch
run: |
git switch -c lockfile-update
git reset --hard main
- name: Update Nix flake
run: nix flake update --commit-lock-file
- name: Update poetry
run: |
nix develop -c bash -c "cd misc; poetry update"
git add .
git commit -m "Update poetry lockfile" ||
echo "Did not update lockfile"
- run: git push -f origin lockfile-update
- run: gh pr create -B main -H lockfile-update -t "Update lockfiles" -b ""
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 6499283

Please sign in to comment.