Update generated files #5
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
# This workflow automates the deployment of generated files | |
name: Update generated files | |
on: workflow_dispatch | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
# TODO update once 25-ea is available | |
strategy: | |
max-parallel: 1 | |
matrix: | |
java-version: [ '17', '21' ] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- name: Set up JDK ${{ matrix.java-version }} | |
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: 'temurin' | |
cache: maven | |
- name: Checkout branch | |
id: checkout | |
run: .github/scripts/checkout.sh update-generated-files-${{ github.sha }} | |
- name: Generate signatures | |
#TODO remove -Pstaging once all Jakarta EE 11 dependencies are GA | |
run: | | |
mvn install -Pstaging --file api/pom.xml | |
mvn package -Pstaging -Psignature-generation --file tck/pom.xml | |
## Add any other automated update steps here | |
- name: Needs updates | |
id: update | |
run: echo "update_count=$(git status -s -uno | wc -l)" >> $GITHUB_OUTPUT | |
- name: Create commit | |
if: steps.update.outputs.update_count > 0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config user.name "github-actions[bot]" | |
git add tck/src/main/resources/ | |
git commit -m "Update generated files ${{ matrix.java-version }}" | |
git push origin update-generated-files-${{ github.sha }} | |
pull-request: | |
needs: [update] | |
uses: ./.github/workflows/pull-request.yml | |
with: | |
branch: 'update-generated-files-${{ github.sha }}' | |
title: 'Update generated files' | |
body: 'generated pull request' |