diff options
| author | seth <[email protected]> | 2024-10-09 10:59:13 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-09 10:59:13 -0400 |
| commit | d17bca56238e9ca326d60e58230d0d354f23bfe8 (patch) | |
| tree | 12aee4c37a1490914e6307ce1b0023be2df93105 /.github/workflows/update-flake.yaml | |
| parent | 7d6495399d5e1ba429a339de1c3a00f121e89305 (diff) | |
back to astro for hopefully the last time (#146)
Diffstat (limited to '.github/workflows/update-flake.yaml')
| -rw-r--r-- | .github/workflows/update-flake.yaml | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/.github/workflows/update-flake.yaml b/.github/workflows/update-flake.yaml index 4e33720..4473811 100644 --- a/.github/workflows/update-flake.yaml +++ b/.github/workflows/update-flake.yaml @@ -8,22 +8,42 @@ on: jobs: update: - name: Run update - runs-on: ubuntu-latest + name: Run update & create PR - permissions: - contents: write - pull-requests: write + runs-on: ubuntu-latest steps: + - name: Generate GitHub App token + uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.PRIVATE_KEY }} + - name: Checkout repository uses: actions/checkout@v4 + with: + token: ${{ steps.app-token.outputs.token }} - name: Install Nix uses: DeterminateSystems/nix-installer-action@v14 - - name: Update flake.lock & make PR - uses: DeterminateSystems/update-flake-lock@v24 + - name: Run update + run: nix flake update + + - name: Create pull request + id: pull-request + uses: peter-evans/create-pull-request@v7 with: - commit-msg: "nix: update flake.lock" - pr-title: "nix: update flake.lock" + branch: update-flake-lock + commit-message: "nix: update flake.lock" + title: "nix: update flake.lock" + token: ${{ steps.app-token.outputs.token }} + sign-commits: true + + - name: Enable auto-merge + if: ${{ env.PR_ID != '' }} + run: gh pr merge --auto --squash "$PR_ID" + env: + PR_ID: ${{ steps.pull-request.outputs.pull-request-number }} + GH_TOKEN: ${{ steps.app-token.outputs.token }} |
