-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #292 from com-pas/develop
merge develop into main
- Loading branch information
Showing
12 changed files
with
75 additions
and
43 deletions.
There are no files selected for viewing
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 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
41 changes: 29 additions & 12 deletions
41
.github/workflows/release-project.yml → .github/workflows/release-please.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,81 @@ | ||
# SPDX-FileCopyrightText: 2022 Alliander N.V. | ||
# SPDX-FileCopyrightText: 2023 Alliander N.V. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: Release Project | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
on: | ||
release: | ||
types: [ released ] | ||
name: release-please | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Build and publish | ||
release_please: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
id: release | ||
with: | ||
release-type: maven | ||
package-name: compas-scl-auto-alignment | ||
- name: Checkout | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache Docker Register | ||
uses: actions/cache@v3 | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: actions/cache@v4 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }} | ||
- name: Cache Maven packages | ||
uses: actions/cache@v3 | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Extract tag name | ||
if: ${{ steps.release.outputs.release_created }} | ||
id: extract_tagname | ||
shell: bash | ||
# 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 17 | ||
uses: actions/[email protected] | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
- name: Set up Docker Buildx | ||
if: ${{ steps.release.outputs.release_created }} | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
- name: Create custom Maven Settings.xml | ||
uses: whelk-io/maven-settings-xml-action@v21 | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: whelk-io/maven-settings-xml-action@v22 | ||
with: | ||
output_file: custom_maven_settings.xml | ||
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]' | ||
- name: Set version with Maven | ||
if: ${{ steps.release.outputs.release_created }} | ||
run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ steps.extract_tagname.outputs.tagname }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Deploy with Maven to GitHub Packages and Docker Hub | ||
if: ${{ steps.release.outputs.release_created }} | ||
run: ./mvnw -B -s custom_maven_settings.xml -Pnative-image,release clean deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 Alliander N.V. | ||
SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
For older changelogs, please check the release tag on GitHub. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 Alliander N.V. | ||
SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
# Security Policy | ||
|
||
## Reporting a Vulnerability | ||
|
||
Please go to [Security Advisories](https://github.com/com-pas/compas-scl-auto-alignment/security/advisories) to privately report a security vulnerability, | ||
our contributors will try to respond within a week of your report with a rough plan for a fix and new tests. |
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 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 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 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 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