From 1580161f8499661e0f65229e8834d94bd92559e3 Mon Sep 17 00:00:00 2001 From: Marco Bungart Date: Mon, 2 Oct 2023 16:18:22 +0200 Subject: [PATCH] Update actions to their most recent version --- .github/workflows/build.yml | 6 +-- .github/workflows/quarkus-snapshot.yaml | 18 ++++--- .github/workflows/release.yml | 65 ++++++++++--------------- 3 files changed, 41 insertions(+), 48 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ddfb81de..4ffa0b2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: steps: - name: Publish Report - uses: turing85/publish-report@v1.0.9 + uses: turing85/publish-report@v1 with: checkout: 'true' recreate-comment: true @@ -179,7 +179,7 @@ jobs: steps: - name: Publish Report - uses: turing85/publish-report@v1.0.9 + uses: turing85/publish-report@v1 with: checkout: 'true' download-artifact-name: test-report-jvm @@ -249,7 +249,7 @@ jobs: steps: - name: Publish Report if: ${{ always() }} - uses: turing85/publish-report@v1.0.9 + uses: turing85/publish-report@v1 with: checkout: 'true' download-artifact-name: test-report-native diff --git a/.github/workflows/quarkus-snapshot.yaml b/.github/workflows/quarkus-snapshot.yaml index 1d9cb63a..45123697 100644 --- a/.github/workflows/quarkus-snapshot.yaml +++ b/.github/workflows/quarkus-snapshot.yaml @@ -18,30 +18,36 @@ env: ECOSYSTEM_CI_REPO_PATH: quarkiverse-artemis +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + jobs: build: name: "Build against latest Quarkus snapshot" runs-on: ubuntu-latest - # Allow to manually launch the ecosystem CI in addition to the bots - if: github.actor == 'quarkusbot' || github.actor == 'quarkiversebot' || github.actor == '' steps: - name: Install yq - run: sudo add-apt-repository ppa:rmescandon/yq && sudo apt update && sudo apt install yq -y + uses: dcarbone/install-yq-action@v1.0.1 - name: Set up Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: temurin java-version: ${{ env.JAVA_VERSION }} - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: current-repo - name: Checkout Ecosystem - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: ${{ env.ECOSYSTEM_CI_REPO }} path: ecosystem-ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d80f0a72..9223f918 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,14 @@ on: paths: - '.github/project.yml' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + jobs: release: runs-on: ubuntu-latest @@ -20,68 +28,47 @@ jobs: github-token: ${{secrets.GITHUB_TOKEN}} metadata-file-path: '.github/project.yml' - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Import GPG key id: import_gpg - uses: crazy-max/ghaction-import-gpg@v3 + uses: crazy-max/ghaction-import-gpg@v6 with: - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} - name: Set up JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: temurin java-version: 17 + cache: 'maven' server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Configure Git author run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" + - name: Update latest release version in docs + run: | + mvn -B -ntp -pl docs -am generate-resources -Denforcer.skip -Dformatter.skip -Dimpsort.skip + if ! git diff --quiet docs/modules/ROOT/pages/includes/attributes.adoc; then + git add docs/modules/ROOT/pages/includes/attributes.adoc + git commit -m "Update the latest release version ${{steps.metadata.outputs.current-version}} in documentation" + fi + - name: Maven release ${{steps.metadata.outputs.current-version}} run: | - git checkout -b release - ./mvnw -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} - git commit -am "Update stable version for documentation" - git checkout ${{github.base_ref}} - git rebase release - ./mvnw -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease + mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} + mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - - name: Adjust tag for documentation changes + - name: Push changes to ${{github.base_ref}} branch run: | - git checkout ${{steps.metadata.outputs.current-version}} - ./mvnw -B clean install -DskipTests -DskipITs - git commit -am "Update stable version for documentation" - # Move the tag after inclusion of documentation adjustments - git tag -f ${{steps.metadata.outputs.current-version}} - # Go back to original branch - git checkout - - - - name: Push changes to ${{github.base_ref}} - uses: ad-m/github-push-action@v0.6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{github.base_ref}} - - - name: Push tags - uses: ad-m/github-push-action@v0.6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - tags: true - branch: ${{github.base_ref}} + git push + git push origin ${{steps.metadata.outputs.current-version}} \ No newline at end of file