Skip to content

Bump tomcat versions #20

Bump tomcat versions

Bump tomcat versions #20

Workflow file for this run

---
name: Bump tomcat versions
on:
push:
paths:
- .github/workflows/bumpVersions.yml
- updatecli.d/**
branches:
- OPSEXP-**
workflow_dispatch:
schedule:
- cron: '0 6 * * MON'
jobs:
updatecli:
name: Tomcat ${{ matrix.tomcat_major }} version bump
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tomcat_major:
- 9
steps:
- name: Checkout
uses: actions/checkout@v3
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.52.0
- name: Run updatecli
env:
TOMCAT_MAJOR: ${{ matrix.tomcat_major }}
run: |
updatecli apply
- uses: stefanzweifel/git-auto-commit-action@v4
id: auto-commit-action
with:
branch: bump-tomcat${{ matrix.tomcat_major }}
create_branch: true
push_options: '--force'
commit_user_name: ${{ vars.BOT_GITHUB_USERNAME }}
commit_user_email: ${{ vars.BOT_GITHUB_EMAIL }}
- name: Retrieve current version
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: |
echo "TOMCAT_VERSION=$(jq -r '.tomcat_version' tomcat${{ matrix.tomcat_major }}.json)" >> $GITHUB_ENV
- 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 tomcat${{ matrix.tomcat_major }} to $TOMCAT_VERSION" --body "Freshly served thanks to updatecli and GitHub Actions"
fi
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}