Update edgepkgs flake input #624
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 edgepkgs flake input | |
| on: | |
| schedule: | |
| - cron: '0 */6 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-flake: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate GitHub App token | |
| id: app-token | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| with: | |
| app-id: ${{ vars.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| persist-credentials: false | |
| - name: Configure git | |
| run: | | |
| USER_ID=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id) | |
| git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' | |
| git config --global user.email "$USER_ID+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com" | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| - uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 | |
| - name: Update edgepkgs flake input | |
| run: nix flake update edgepkgs | |
| - name: Create Pull Request | |
| id: create-pr | |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| branch: auto-update/edgepkgs | |
| title: 'chore: update edgepkgs' | |
| body: | | |
| Automated update of edgepkgs flake input. | |
| commit-message: 'chore: update edgepkgs' | |
| sign-commits: true | |
| - name: Enable auto-merge | |
| if: steps.create-pr.outputs.pull-request-number | |
| run: | | |
| gh pr merge --auto --squash "${{ steps.create-pr.outputs.pull-request-number }}" | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} |