File tree Expand file tree Collapse file tree
cookiecutter/{{cookiecutter.github_repo_name}}/.github/workflows
docs/user-guide/start-a-new-project
tests_golden/integration/test_cookiecutter_generation
actor/frequenz-actor-test/.github/workflows
api/frequenz-api-test/.github/workflows
app/frequenz-app-test/.github/workflows
lib/frequenz-test-python/.github/workflows
model/frequenz-model-test/.github/workflows Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 pull_request :
55
66permissions :
7- contents : write
7+ contents : read
88 pull-requests : write
99
1010jobs :
1111 auto-merge :
1212 if : github.actor == 'dependabot[bot]'
1313 runs-on : ubuntu-slim
1414 steps :
15+ - name : Generate GitHub App token
16+ id : app-token
17+ uses : actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
18+ with :
19+ app-id : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
20+ private-key : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
21+
1522 - name : Auto-merge Dependabot PR
1623 uses : frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2
1724 with :
18- github-token : ${{ secrets.GITHUB_TOKEN }}
25+ github-token : ${{ steps.app-token.outputs.token }}
1926 dependency-type : ' all'
2027 auto-merge : ' true'
2128 merge-method : ' merge'
Original file line number Diff line number Diff line change @@ -115,6 +115,25 @@ Import the following
115115
116116* Enable * Dependabot version updates* if relevant
117117
118+ #### Auto-merge Dependabot PRs (GitHub App)
119+
120+ The templates include an ` .github/workflows/auto-dependabot.yaml ` workflow that
121+ auto-approves and enables auto-merge for Dependabot PRs.
122+
123+ This workflow uses a GitHub App installation token (not ` GITHUB_TOKEN ` ). This is
124+ intentional: actions performed with ` GITHUB_TOKEN ` do not trigger certain
125+ follow-up workflow runs, which can prevent merge queue CI (` merge_group ` ) from
126+ starting.
127+
128+ To make it work, ensure:
129+
130+ * The GitHub App is installed on the repository.
131+ * The following secrets are available to the workflow (typically as org secrets):
132+ ` FREQUENZ_AUTO_DEPENDABOT_APP_ID ` and ` FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY ` .
133+ * The app installation has sufficient repository permissions to approve/label
134+ and enable auto-merge. In practice, this means at least ` Pull requests: write `
135+ and ` Contents: write ` .
136+
118137## Code
119138
120139The basic code configuration should be generate using
Original file line number Diff line number Diff line change 44 pull_request :
55
66permissions :
7- contents : write
7+ contents : read
88 pull-requests : write
99
1010jobs :
1111 auto-merge :
1212 if : github.actor == 'dependabot[bot]'
1313 runs-on : ubuntu-slim
1414 steps :
15+ - name : Generate GitHub App token
16+ id : app-token
17+ uses : actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
18+ with :
19+ app-id : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
20+ private-key : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
21+
1522 - name : Auto-merge Dependabot PR
1623 uses : frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2
1724 with :
18- github-token : ${{ secrets.GITHUB_TOKEN }}
25+ github-token : ${{ steps.app-token.outputs.token }}
1926 dependency-type : ' all'
2027 auto-merge : ' true'
2128 merge-method : ' merge'
Original file line number Diff line number Diff line change 44 pull_request :
55
66permissions :
7- contents : write
7+ contents : read
88 pull-requests : write
99
1010jobs :
1111 auto-merge :
1212 if : github.actor == 'dependabot[bot]'
1313 runs-on : ubuntu-slim
1414 steps :
15+ - name : Generate GitHub App token
16+ id : app-token
17+ uses : actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
18+ with :
19+ app-id : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
20+ private-key : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
21+
1522 - name : Auto-merge Dependabot PR
1623 uses : frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2
1724 with :
18- github-token : ${{ secrets.GITHUB_TOKEN }}
25+ github-token : ${{ steps.app-token.outputs.token }}
1926 dependency-type : ' all'
2027 auto-merge : ' true'
2128 merge-method : ' merge'
Original file line number Diff line number Diff line change 44 pull_request :
55
66permissions :
7- contents : write
7+ contents : read
88 pull-requests : write
99
1010jobs :
1111 auto-merge :
1212 if : github.actor == 'dependabot[bot]'
1313 runs-on : ubuntu-slim
1414 steps :
15+ - name : Generate GitHub App token
16+ id : app-token
17+ uses : actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
18+ with :
19+ app-id : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
20+ private-key : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
21+
1522 - name : Auto-merge Dependabot PR
1623 uses : frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2
1724 with :
18- github-token : ${{ secrets.GITHUB_TOKEN }}
25+ github-token : ${{ steps.app-token.outputs.token }}
1926 dependency-type : ' all'
2027 auto-merge : ' true'
2128 merge-method : ' merge'
Original file line number Diff line number Diff line change 44 pull_request :
55
66permissions :
7- contents : write
7+ contents : read
88 pull-requests : write
99
1010jobs :
1111 auto-merge :
1212 if : github.actor == 'dependabot[bot]'
1313 runs-on : ubuntu-slim
1414 steps :
15+ - name : Generate GitHub App token
16+ id : app-token
17+ uses : actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
18+ with :
19+ app-id : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
20+ private-key : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
21+
1522 - name : Auto-merge Dependabot PR
1623 uses : frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2
1724 with :
18- github-token : ${{ secrets.GITHUB_TOKEN }}
25+ github-token : ${{ steps.app-token.outputs.token }}
1926 dependency-type : ' all'
2027 auto-merge : ' true'
2128 merge-method : ' merge'
Original file line number Diff line number Diff line change 44 pull_request :
55
66permissions :
7- contents : write
7+ contents : read
88 pull-requests : write
99
1010jobs :
1111 auto-merge :
1212 if : github.actor == 'dependabot[bot]'
1313 runs-on : ubuntu-slim
1414 steps :
15+ - name : Generate GitHub App token
16+ id : app-token
17+ uses : actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
18+ with :
19+ app-id : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
20+ private-key : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
21+
1522 - name : Auto-merge Dependabot PR
1623 uses : frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2
1724 with :
18- github-token : ${{ secrets.GITHUB_TOKEN }}
25+ github-token : ${{ steps.app-token.outputs.token }}
1926 dependency-type : ' all'
2027 auto-merge : ' true'
2128 merge-method : ' merge'
You can’t perform that action at this time.
0 commit comments