Skip to content

Bump updatecli/updatecli-action from 2.62.0 to 2.64.0 (#172) #136

Bump updatecli/updatecli-action from 2.62.0 to 2.64.0 (#172)

Bump updatecli/updatecli-action from 2.62.0 to 2.64.0 (#172) #136

Workflow file for this run

---
name: Bump tomcat versions
on:
push:
branches-ignore:
- dependabot/**
paths:
- .github/workflows/bumpVersions.yml
- updatecli.d/**
- get-checksum.sh
workflow_dispatch:
schedule:
- cron: '0 6 * * MON'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
updatecli:
name: Tomcat ${{ matrix.tomcat_major }} version bump
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- tomcat_major: 10
tcnative_source_pattern: 1
- tomcat_major: 9
tcnative_source_pattern: 1
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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@3a8785d88ec4fa03d86521a181f37c0e74627463 # v2.64.0
with:
version: v0.66.0
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@abcbd5d83bbe1a69c8da087467fcd132ca0c7a27
- name: Install htmlq
run: |
brew install htmlq
- name: Set required environment variables
run: |
echo "TOMCAT_MAJOR=${{ matrix.tomcat_major }}" >> $GITHUB_ENV
echo "TCNATIVE_SOURCE_PATTERN=${{ matrix.tcnative_source_pattern }}" >> $GITHUB_ENV
- name: Run updatecli
run: |
updatecli apply
- name: Set new tomcat version as env var
run: |
echo "TOMCAT_VERSION=$(jq -r '.tomcat_version' tomcat${{ matrix.tomcat_major }}.json)" >> $GITHUB_ENV
- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
id: auto-commit-action
with:
branch: bump-tomcat-${{ env.TOMCAT_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 tomcat to ${{ env.TOMCAT_VERSION }}" --body "Freshly served thanks to updatecli and GitHub Actions"
fi
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}