Update nvfetcher #25997
This file contains hidden or 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: | |
| paths: | |
| - packages/nvfetcher.toml | |
| jobs: | |
| update-nvfetcher: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| # TODO: https://github.com/peter-evans/create-pull-request/issues/4228 | |
| with: | |
| persist-credentials: false | |
| - uses: nixbuild/nix-quick-install-action@2c9db80fb984ceb1bcaa77cdda3fdf8cfba92035 # v34 | |
| with: | |
| nix_conf: | | |
| keep-env-derivations = true | |
| keep-outputs = true | |
| - uses: nix-community/cache-nix-action@106bba72ed8e29c8357661199511ef07790175e9 # v7.0.1 | |
| with: | |
| primary-key: nvfetcher-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} | |
| restore-prefixes-first-match: nvfetcher-${{ runner.os }}- | |
| gc-max-store-size-linux: 1G | |
| purge: true | |
| purge-prefixes: nvfetcher-${{ runner.os }}- | |
| purge-created: 0 | |
| purge-last-accessed: 0 | |
| purge-primary-key: never | |
| - run: nix profile install github:berberman/nvfetcher | |
| - id: update_nvfetcher | |
| run: | | |
| cd packages | |
| echo "OUTPUT<<EOF" >> $GITHUB_OUTPUT | |
| 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@v8 | |
| 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 |