This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:uio-bmi/localega-tsd-proxy into f…
…eature/get-tsd-token
- Loading branch information
Showing
21 changed files
with
216 additions
and
140 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Build Package with Maven | ||
|
||
on: | ||
push: | ||
pull_request_target: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
cache: maven | ||
|
||
- name: create maven settings.xml | ||
uses: s4u/[email protected] | ||
with: | ||
servers: | | ||
[{ | ||
"id":"github-clearinghouse", | ||
"username": "${{ github.actor }}", | ||
"password": "${{ secrets.GITHUB_TOKEN }}" | ||
}, | ||
{ | ||
"id":"github-tsd-file-api-client", | ||
"username": "${{ github.actor }}", | ||
"password": "${{ secrets.GITHUB_TOKEN }}" | ||
}] | ||
- name: Build with Maven | ||
run: mvn -B clean package -DskipTests --file pom.xml |
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,30 @@ | ||
name: Trivy vulnerability scan | ||
|
||
on: | ||
schedule: | ||
- cron: '0 7 * * *' | ||
|
||
jobs: | ||
scan: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@9ab158e8597f3b310480b9a69402b419bc03dbd5 | ||
with: | ||
args: --security-checks vuln | ||
image-ref: 'ghcr.io/${{ github.repository }}:latest' | ||
format: 'sarif' | ||
output: 'trivy-results.sarif' | ||
severity: 'CRITICAL,HIGH' | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: 'trivy-results.sarif' |
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 |
---|---|---|
|
@@ -2,7 +2,9 @@ name: Bump version and publish to ghcr.io | |
on: | ||
push: | ||
branches: | ||
- master | ||
- master | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
tag: | ||
|
@@ -13,17 +15,17 @@ jobs: | |
new_tag: ${{ steps.bump_tag.outputs.new_tag }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '1' | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '1' | ||
|
||
- name: Bump version and push tag | ||
id: bump_tag | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DEFAULT_BUMP: patch | ||
- name: Bump version and push tag | ||
id: bump_tag | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DEFAULT_BUMP: patch | ||
|
||
push_to_registry: | ||
needs: tag | ||
|
@@ -37,9 +39,6 @@ jobs: | |
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Add Maven Github authentication | ||
run: echo "<settings xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd'> <servers> <server> <id>github-clearinghouse</id> <username>${{ github.actor }}</username> <password>${{ secrets.GITHUB_TOKEN }}</password> </server> <server> <id>github-tsd-file-api-client</id> <username>${{ github.actor }}</username> <password>${{ secrets.GITHUB_TOKEN }}</password> </server> </servers> </settings>" > settings.xml | ||
|
||
- name: Log in to the Github Container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
|
@@ -53,6 +52,25 @@ jobs: | |
with: | ||
images: ghcr.io/${{ github.repository }} | ||
|
||
- name: create maven settings.xml | ||
uses: s4u/[email protected] | ||
with: | ||
servers: | | ||
[{ | ||
"id":"github-clearinghouse", | ||
"username": "${{ github.actor }}", | ||
"password": "${{ secrets.GITHUB_TOKEN }}" | ||
}, | ||
{ | ||
"id":"github-tsd-file-api-client", | ||
"username": "${{ github.actor }}", | ||
"password": "${{ secrets.GITHUB_TOKEN }}" | ||
}] | ||
- name: Copy settings.xml to project root | ||
shell: bash | ||
run: cp /home/runner/.m2/settings.xml ./settings.xml | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
|
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
Oops, something went wrong.