948fe713ea
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 24 to 25. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v24...v25) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
64 lines
1.6 KiB
YAML
64 lines
1.6 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
|
|
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v25
|
|
|
|
- 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
|
|
id: branch
|
|
run: |
|
|
# try not to conflict with other branches
|
|
branch="update-lock/${{ github.run_id }}"
|
|
|
|
echo "branch=$branch" >> "$GITHUB_OUTPUT"
|
|
git switch -c "$branch"
|
|
|
|
- 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 ./dev nixpkgs#nvfetcher
|
|
|
|
if ! git diff --color=always --exit-code; then
|
|
git commit -am "chore: update nvfetcher sources"
|
|
fi
|
|
|
|
- name: Make PR if needed
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
if ! git diff --color=always --exit-code origin/main; then
|
|
git push -u origin ${{ steps.branch.outputs.branch }}
|
|
|
|
gh pr create \
|
|
--base main \
|
|
--head "${{ steps.branch.outputs.branch }}" \
|
|
--title "chore: update lockfiles" \
|
|
--fill
|
|
fi
|