-
Notifications
You must be signed in to change notification settings - Fork 6
66 lines (58 loc) · 1.92 KB
/
bumpVersions.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
name: Bump activemq versions
on:
push:
paths:
- .github/workflows/bumpVersions.yml
- updatecli.d/**
branches:
- OPSEXP-**
workflow_dispatch:
schedule:
- cron: '0 6 * * MON'
jobs:
updatecli:
name: activemq ${{ matrix.activemq_base_version }} version bump
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
activemq_base_version:
- 5.16
- 5.17
- 5.18
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Required to trigger the main workflow once this workflow creates a PR
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Install updatecli
uses: updatecli/updatecli-action@v2
with:
version: v0.54.0
- name: Set updatecli required environment variables
run: |
echo "ACTIVEMQ_BASE_VERSION=${{ matrix.activemq_base_version }}" >> $GITHUB_ENV
- name: Run updatecli
run: |
updatecli apply
- name: Set environment variables after updatecli
run: |
echo "ACTIVEMQ_VERSION=$(jq -r '.activemq_version' versions/activemq-${{ matrix.activemq_base_version }}.json)" >> $GITHUB_ENV
- uses: stefanzweifel/git-auto-commit-action@v5
id: auto-commit-action
with:
branch: bump-activemq-${{ env.ACTIVEMQ_VERSION }}
create_branch: true
push_options: '--force'
commit_user_name: ${{ vars.BOT_GITHUB_USERNAME }}
commit_user_email: ${{ vars.BOT_GITHUB_EMAIL }}
- name: Autocreate PR
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: |
if ! gh pr view --json url --jq .url; then
gh pr create --title "Bump activemq to ${{ env.ACTIVEMQ_VERSION }}" --body "Freshly served thanks to updatecli and GitHub Actions"
fi
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}