Merge pull request #6 from jfdenise/main #5
Workflow file for this run
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: WildFly Catalog generation - CI on Merge | |
| on: | |
| push: | |
| branches: | |
| - "!*" | |
| tags: | |
| - "v_*" | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }}-jdk${{ matrix.java }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| java: ['21'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
| fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Catalog generation | |
| run: | | |
| ./build-catalog.sh -Drelease=true | |
| changes="$(git status --porcelain)" | |
| if [ -n "$changes" ]; then | |
| # Commit the changes. | |
| git config --global user.name "${{ github.actor }}" | |
| git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
| git add * | |
| git commit -m "GitHub Actions: Updated catalog for WildFly $version" | |
| echo "NEED_PUSH=true" >> "$GITHUB_ENV" | |
| fi | |
| shell: bash | |
| - name: Push changes | |
| if: env.NEED_PUSH == 'true' | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: ${{ github.ref }} | |
| force: true | |
| tags: true |