53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: Update lockfiles
|
|
|
|
on:
|
|
schedule:
|
|
# run every friday
|
|
- cron: "0 0 * * 5"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update:
|
|
name: Run update
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v24
|
|
|
|
- name: Set Git user info
|
|
run: |
|
|
git config user.name 'github-actions[bot]'
|
|
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
|
|
|
- name: Create new branch
|
|
run: |
|
|
# try not to conflict with other branches
|
|
git switch -c update-lock/${{ github.run_id }}
|
|
|
|
- name: Update flake inputs
|
|
run: |
|
|
pushd dev
|
|
|
|
nix flake update \
|
|
--commit-lock-file \
|
|
--commit-lockfile-summary "chore: update dev flake inputs"
|
|
|
|
popd
|
|
|
|
- name: Update upstream sources
|
|
run: |
|
|
nix run --inputs-from . nixpkgs#nvfetcher
|
|
|
|
if ! git diff --color=always --exit-code; then
|
|
git commit -am "chore: update nvfetch sources"
|
|
fi
|
|
|
|
- name: Create PR
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
gh pr create \
|
|
--base main \
|
|
--title "chore: update lockfiles" \
|
|
--fill
|