-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.33 KB
/
upgrade-keycloak.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
39
40
41
name: Build
on:
pull_request:
types:
- opened
- synchronize
- edited
jobs:
upgrade:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' }}
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
- name: Auto merge patch and minor updates
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.KEYCLOAK_RELEASE_SECRET }}
- name: Release new version
if: ${{ steps.dependabot-metadata.outputs.dependency-names == 'keycloak/keycloak' }}
env:
# Using the default Github Token will not trigger an event so that we build the release.
# Therefore we're using a personal access token.
# See: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
GITHUB_TOKEN: ${{ secrets.RELEASE_SECRET }}
run: |
gh release create v${{ steps.dependabot-metadata.outputs.new-version }} --notes "${{ steps.dependabot-metadata.outputs.new-version }}"