Update nvfetcher #975
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update nvfetcher | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: 0 * * * * | |
push: | |
branches: | |
- main | |
paths: | |
- pkgs/nvfetcher.toml | |
jobs: | |
update-nvfetcher: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a # v15 | |
- name: Set up Magic Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@87b14cf437d03d37989d87f0fa5ce4f5dc1a330b # v8 | |
- name: Run nvfetcher | |
id: run-nvfetcher | |
run: | | |
cd pkgs | |
{ | |
echo 'changes<<EOF' | |
nix-shell -p nvfetcher --command 'nvfetcher' | sed -n '/Changes/,/$!d/p' | |
echo 'EOF' | |
} >> "$GITHUB_OUTPUT" | |
- name: Generate Token | |
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1 | |
id: app-token | |
with: | |
app-id: "${{ secrets.BOT_APP_ID }}" | |
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" | |
- name: Create Pull Request | |
id: create-pull-request | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
branch: nvfetcher/deps | |
title: "chore(deps): Update packages managed by nvfetcher" | |
commit-message: "chore(deps): Update packages managed by nvfetcher" | |
body: | | |
## ${{ steps.run-nvfetcher.outputs.changes }} | |
add-paths: | | |
pkgs/** | |
delete-branch: true |