Bump tomcat versions #267
This file contains hidden or 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: | |
| pull_request: | |
| 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 | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - tomcat_major: 11 | |
| tcnative_source_pattern: 2 | |
| apr_source_pattern: 1 | |
| - 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Install updatecli | |
| uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
| - 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 | |
| - name: Set target branch | |
| run: | | |
| echo "TARGET_BRANCH=bump-tomcat-${{ env.TOMCAT_VERSION }}" >> $GITHUB_ENV | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| branch: ${{ env.TARGET_BRANCH }} | |
| base: ${{ github.event.repository.default_branch }} | |
| title: "Bump tomcat to ${{ env.TOMCAT_VERSION }}" | |
| body: "Freshly served thanks to updatecli and GitHub Actions" | |
| token: ${{ secrets.BOT_GITHUB_TOKEN }} | |
| team-reviewers: ops-readiness-performance | |
| author: ${{ vars.BOT_GITHUB_USERNAME }} <${{ vars.BOT_GITHUB_EMAIL }}> | |
| committer: ${{ vars.BOT_GITHUB_USERNAME }} <${{ vars.BOT_GITHUB_EMAIL }}> | |
| labels: updatecli |