Bump activemq versions #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 }} |