Skip to content

Commit

Permalink
5xx Prevent GitHub Actions from being triggered twice (#2559) (#2563)
Browse files Browse the repository at this point in the history
* Update RELEASE.md

* Update RELEASE.md

* Update RELEASE.md

* Update RELEASE.md

* Add PR link

* Fix CVE scanning (#2561)

* Fixed CVE scan

* Added JAVA_HOME env

* Fixed versioning

* Fixed versioning

* Fixed versioning

* Prevent GitHub Actions from being triggered twice (#2559)

* Corrected action workflows

* Test

* Test

* Fixed

* Cleaned

* Prevent GitHub Actions from being triggered twice (#2559)

* Corrected action workflows

* Test

* Test

* Fixed

* Cleaned

* Restored release.md

* Restored release.md

---------

Co-authored-by: JayasriR <124573358+JayasriR@users.noreply.github.com>
Co-authored-by: Hugo Hills <39260692+hugohills-regnosys@users.noreply.github.com>
Co-authored-by: eacunaISDA <82891014+eacunaISDA@users.noreply.github.com>
Co-authored-by: lolabeis <leo.labeis@regnosys.com>
  • Loading branch information
5 people authored Dec 1, 2023
1 parent c977d95 commit b49ab16
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 24 deletions.
23 changes: 23 additions & 0 deletions .github/actions/maven-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Maven Build
description: Run a Maven Build

inputs:
run-tests:
description: Whether or not to run tests. The default is true.
required: false
type: boolean
default: true

runs:
using: "composite"
steps:
- name: Set up JDK 11 for x64
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
architecture: x64
cache: maven
- name: Build with Maven
shell: bash
run: mvn -B -U clean package${{ inputs.run-tests && '' || ' -DskipTests' }}
9 changes: 2 additions & 7 deletions .github/workflows/cve-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
- uses: ./.github/actions/maven-build
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn clean install -DskipTests
run-tests: false
- name: CVE scanning
uses: dependency-check/Dependency-Check_Action@1.1.0
env:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/license-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: License Scanning for Maven
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'pom.xml'
- '.github/workflows/license-scanning.yml'
pull_request:
paths:
- 'pom.xml'
- '.github/workflows/license-scanning.yml'
Expand All @@ -19,16 +25,11 @@ jobs:
module-folder: ["./", "./examples", "./rosetta-source", "./rosetta-project", "./distribution"]
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
cache: maven
distribution: 'adopt'
- name: Install XQ
run: pip install xq
- name: Build with Maven
run: mvn clean install -DskipTests
- uses: ./.github/actions/maven-build
with:
run-tests: false
- name: License XML report
run: mvn org.codehaus.mojo:license-maven-plugin:2.0.0:download-licenses
- name: Validate XML report
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
name: CDM Build on Windows machine

on: [workflow_dispatch, push, pull_request]
on:
workflow_dispatch:
pull_request:

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Maven install
run: mvn install
- uses: ./.github/actions/maven-build

0 comments on commit b49ab16

Please sign in to comment.