templates for self-hosting game jams (or any other kind of jam tbh)
1# see https://gist.github.com/xt0rted/46475099dc0a70ba63e16e3177407872
2
3name: Dependabot auto-merge
4
5on:
6 pull_request:
7 branches:
8 - master
9
10permissions:
11 contents: read
12 pull-requests: read
13
14jobs:
15 auto-merge:
16 runs-on: ubuntu-latest
17
18 if: github.actor == 'dependabot[bot]'
19
20 steps:
21 - name: Create token
22 id: create_token
23 uses: tibdex/github-app-token@v2
24 with:
25 app_id: ${{ secrets.BIG_MERGER_APP_ID }}
26 private_key: ${{ secrets.BIG_MERGER_PRIVATE_KEY }}
27
28 - name: Dependabot metadata
29 id: dependabot-metadata
30 uses: dependabot/fetch-metadata@v2
31 with:
32 github-token: "${{ secrets.GITHUB_TOKEN }}"
33
34 - name: Authenticate cli
35 run: echo "${{ steps.create_token.outputs.token }}" | gh auth login --with-token
36
37 - name: Enable auto-merge for Dependabot PRs
38 if: contains(fromJSON('["version-update:semver-patch", "version-update:semver-minor"]'), steps.dependabot-metadata.outputs.update-type)
39 run: gh pr merge --auto --squash "$PR_URL"
40 env:
41 PR_URL: ${{github.event.pull_request.html_url}}