From 2d4570d0fd66626aaa90ab669c67df4cab1c37f3 Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Tue, 23 Aug 2022 09:04:02 +0200 Subject: [PATCH] Fixed GitHub Actions. Signed-off-by: Dennis Labordus --- .github/dependabot.yml | 2 +- .github/workflows/automate-projects.yml | 2 +- .github/workflows/build-project.yml | 7 +++++-- .github/workflows/release-project.yml | 10 +++++++--- .github/workflows/reuse.yml | 9 +++++---- .github/workflows/sonarcloud-analysis.yml | 20 +++++++++++--------- 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4f72716..0b1575c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 Alliander N.V. +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 diff --git a/.github/workflows/automate-projects.yml b/.github/workflows/automate-projects.yml index afc1be6..3c61af0 100644 --- a/.github/workflows/automate-projects.yml +++ b/.github/workflows/automate-projects.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 Alliander N.V. +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index 888b90a..0926958 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 Alliander N.V. +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 @@ -20,12 +20,15 @@ jobs: timeout-minutes: 15 steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 + - name: Set up JDK 1.11 uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: '11' + - name: Create custom Maven Settings.xml uses: whelk-io/maven-settings-xml-action@v20 with: diff --git a/.github/workflows/release-project.yml b/.github/workflows/release-project.yml index a4b729d..d70c768 100644 --- a/.github/workflows/release-project.yml +++ b/.github/workflows/release-project.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 Alliander N.V. +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 @@ -15,17 +15,21 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 + - name: Extract tag name id: extract_tagname shell: bash - # Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/. + # Extract the tag name from the git reference, value of GITHUB_REF will be something like refs/tags/. run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})" + - name: Set up JDK 1.11 uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: '11' + - name: Create custom Maven Settings.xml uses: whelk-io/maven-settings-xml-action@v20 with: diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index ea657bb..9ebd56d 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 RTE FRANCE +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 @@ -10,6 +10,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: REUSE Compliance Check - uses: fsfe/reuse-action@v1 + - name: Checkout + uses: actions/checkout@v3 + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v1 diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index b08e988..3d28c55 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021 RTE FRANCE +# SPDX-FileCopyrightText: 2022 Alliander N.V. # # SPDX-License-Identifier: Apache-2.0 @@ -25,14 +25,10 @@ jobs: if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }} steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up JDK 1.11 - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: '11' - name: Cache SonarCloud packages uses: actions/cache@v3 @@ -47,6 +43,12 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 + - name: Set up JDK 1.11 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '11' + - name: Set Common Sonar Variables id: sonar_env run: | @@ -70,7 +72,7 @@ jobs: -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \ -Dsonar.pullrequest.base=${{ github.base_ref }} \ -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} \ - verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar - name: Build and analyze (Push) if: ${{ github.event_name == 'push' }} env: @@ -80,4 +82,4 @@ jobs: ./mvnw -B -s custom_maven_settings.xml -Psonar \ ${{ steps.sonar_env.outputs.sonar_opts }} \ -Dsonar.branch.name=${{ github.ref_name }} \ - verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar