workflows/periodic-merges: use nixpkgs-ci's token
This commit is contained in:
4
.github/workflows/periodic-merge-24h.yml
vendored
4
.github/workflows/periodic-merge-24h.yml
vendored
@@ -14,9 +14,7 @@ on:
|
|||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions: {}
|
||||||
contents: write # for devmasx/merge-branch to merge branches
|
|
||||||
pull-requests: write # for peter-evans/create-or-update-comment to create or update comment
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
periodic-merge:
|
periodic-merge:
|
||||||
|
|||||||
4
.github/workflows/periodic-merge-6h.yml
vendored
4
.github/workflows/periodic-merge-6h.yml
vendored
@@ -14,9 +14,7 @@ on:
|
|||||||
- cron: '0 */6 * * *'
|
- cron: '0 */6 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions: {}
|
||||||
contents: write # for devmasx/merge-branch to merge branches
|
|
||||||
pull-requests: write # for peter-evans/create-or-update-comment to create or update comment
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
periodic-merge:
|
periodic-merge:
|
||||||
|
|||||||
11
.github/workflows/periodic-merge.yml
vendored
11
.github/workflows/periodic-merge.yml
vendored
@@ -17,6 +17,14 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
name: ${{ inputs.from }} → ${{ inputs.into }}
|
name: ${{ inputs.from }} → ${{ inputs.into }}
|
||||||
steps:
|
steps:
|
||||||
|
# Use a GitHub App to create the PR so that CI gets triggered
|
||||||
|
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs
|
||||||
|
- uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||||
|
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Find merge base between two branches
|
- name: Find merge base between two branches
|
||||||
@@ -38,7 +46,7 @@ jobs:
|
|||||||
type: now
|
type: now
|
||||||
from_branch: ${{ steps.merge_base.outputs.merge_base || inputs.from }}
|
from_branch: ${{ steps.merge_base.outputs.merge_base || inputs.from }}
|
||||||
target_branch: ${{ inputs.into }}
|
target_branch: ${{ inputs.into }}
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ steps.app-token.outputs.token }}
|
||||||
|
|
||||||
- name: Comment on failure
|
- name: Comment on failure
|
||||||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
|
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
|
||||||
@@ -47,3 +55,4 @@ jobs:
|
|||||||
issue-number: 105153
|
issue-number: 105153
|
||||||
body: |
|
body: |
|
||||||
Periodic merge from `${{ inputs.from }}` into `${{ inputs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
|
Periodic merge from `${{ inputs.from }}` into `${{ inputs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
|||||||
Reference in New Issue
Block a user