add APR to updatecli manifest #152
Workflow file for this run
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 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: 2 | |
apr_source_pattern: 1 | |
- tomcat_major: 9 | |
tcnative_source_pattern: 2 | |
apr_source_pattern: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
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@92a13b95c2cd9f1c6742c965509203c6a5635ed7 # v2.68.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 | |
echo "APR_SOURCE_PATTERN=${{ matrix.apr_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 }} |