try fetchgit with app token #30
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-nix-fetchgit" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "22 9 * * 0" | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/update-nix-fetchgit.yaml" | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/create-github-app-token@v1.11.1 | |
id: generate-token | |
with: | |
app-id: ${{ secrets.CPR_APP_ID }} | |
private-key: ${{ secrets.CPR_APP_PRIVATE_KEY }} | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- uses: workflow/nix-shell-action@v3 | |
with: | |
packages: fd,update-nix-fetchgit | |
script: | | |
fd .nix --exec update-nix-fetchgit --only-commented || true | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
commit-message: Update fetchgit* refs | |
title: 'Update fetchgit* refs' | |
draft: false | |
branch: chore/update-nix-fetch-git | |
delete-branch: true |