Skip to content

Bump tomcat versions #41

Bump tomcat versions

Bump tomcat versions #41

Workflow file for this run

---
name: Bump tomcat versions
on:
push:
paths:
- .github/workflows/bumpVersions.yml
- updatecli.d/**
- get-checksum.sh
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
- 10
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 ENV
run: |
echo "TOMCAT_MAJOR=${{ matrix.tomcat_major }}" >> $GITHUB_ENV
echo "TOMCAT_VERSION=$(jq -r '.tomcat_version' tomcat${{ matrix.tomcat_major }}.json)" >> $GITHUB_ENV
echo "TCNATIVE_VERSION=$(jq -r '.tcnative_version' tomcat${{ matrix.tomcat_major }}.json)" >> $GITHUB_ENV
- name: Run updatecli
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: 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 }}" --body "Freshly served thanks to updatecli and GitHub Actions"
fi
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}