Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small changes to GitHub Actions #157

Merged
merged 1 commit into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Alliander N.V.
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automate-projects.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Alliander N.V.
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Alliander N.V.
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -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:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release-project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Alliander N.V.
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -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/<tag_name>.
# Extract the tag name from the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
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:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 RTE FRANCE
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -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
20 changes: 11 additions & 9 deletions .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 RTE FRANCE
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -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
Expand All @@ -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: |
Expand All @@ -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:
Expand All @@ -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