Skip to content

Update nvfetcher #12863

Update nvfetcher

Update nvfetcher #12863

name: Update nvfetcher
on:
workflow_dispatch: {}
schedule:
- cron: 0 * * * *
push:
paths:
- nixos/packages/nvfetcher.toml
jobs:
update-nvfetcher:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: workflow/nix-shell-action@v3.3.0
id: update_nvfetcher
with:
flakes-from-devshell: true
script: |
cd nixos/packages
echo "OUTPUT<<EOF" >> $GITHUB_OUTPUT
echo "$(nvfetcher | sed -n '/Changes/,/$!d/p')" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Generate token
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-token.outputs.token }}
title: "chore(deps): update packages managed by nvfetcher"
commit-message: "chore(deps): update packages managed by nvfetcher"
delete-branch: true
labels: nvfetcher
committer: budimanjojo-bot <111944664+budimanjojo-bot[bot]@users.noreply.github.com>
author: budimanjojo-bot <111944664+budimanjojo-bot[bot]@users.noreply.github.com>
body: |
${{ steps.update_nvfetcher.outputs.OUTPUT }}
- name: Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ steps.generate-token.outputs.token }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash