-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.16 KB
/
bump_version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Bump version
run-name: ${{ github.actor }} is updating service versions 🧉
# Set the access for individual scopes, or use permissions: write-all
permissions:
id-token: write
pull-requests: write
contents: write
packages: write
on:
pull_request:
jobs:
tests:
uses: ./.github/workflows/ci_job.yml
dependabot:
name: Merge PR by dependabot
runs-on: ubuntu-latest
needs: tests
# Specifically check that dependabot (or another trusted party) created this pull-request, and that it has been labelled correctly.
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.TOKEN }}"
- name: Approve dependabot's PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.TOKEN}}
- name: Auto-merge for dependabot's PR
run: gh pr merge --merge --auto "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.TOKEN}}