|
| 1 | +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time |
| 2 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven |
| 3 | + |
| 4 | +# This workflow uses actions that are not certified by GitHub. |
| 5 | +# They are provided by a third-party and are governed by |
| 6 | +# separate terms of service, privacy policy, and support |
| 7 | +# documentation. |
| 8 | + |
| 9 | +name: GCM Pipeline Development Build |
| 10 | + |
| 11 | +on: |
| 12 | + push: |
| 13 | + branches: [ "dev" ] |
| 14 | + pull_request: |
| 15 | + branches: [ "dev" ] |
| 16 | + |
| 17 | +jobs: |
| 18 | + dev-build: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - name: Checkout GCM Pipeline |
| 22 | + uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - name: Set up JDK 17 |
| 25 | + uses: actions/setup-java@v4 |
| 26 | + with: |
| 27 | + java-version: '17' |
| 28 | + distribution: 'temurin' |
| 29 | + cache: maven |
| 30 | + |
| 31 | + - name: Get GCM Version |
| 32 | + run: | |
| 33 | + echo "gcm_version=v$(mvn help:evaluate -Dexpression=gcm.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV" |
| 34 | +
|
| 35 | + - name: Checkout GCM |
| 36 | + if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }} |
| 37 | + uses: actions/checkout@v4 |
| 38 | + with: |
| 39 | + repository: HHS/ASPR-8 |
| 40 | + path: gcm |
| 41 | + ref: dev |
| 42 | + |
| 43 | + - name: Get GCM Taskit Version |
| 44 | + run: | |
| 45 | + echo "gcm_taskit_version=v$(mvn help:evaluate -Dexpression=gcm-taskit.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV" |
| 46 | +
|
| 47 | + - name: Checkout GCM Taskit |
| 48 | + if: ${{ endsWith(env.gcm_taskit_version, 'SNAPSHOT') }} |
| 49 | + uses: actions/checkout@v4 |
| 50 | + with: |
| 51 | + repository: HHS/ASPR-ms-gcm-taskit |
| 52 | + path: gcm-taskit |
| 53 | + ref: dev |
| 54 | + |
| 55 | + - name: Get Util Version |
| 56 | + if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }} |
| 57 | + run: | |
| 58 | + echo "util_version=v$(mvn help:evaluate -Dexpression=util.version -q -DforceStdout --file gcm/pom.xml)" >> "$GITHUB_ENV" |
| 59 | +
|
| 60 | + - name: Checkout Util |
| 61 | + if: ${{ endsWith(env.util_version, 'SNAPSHOT') }} |
| 62 | + uses: actions/checkout@v4 |
| 63 | + with: |
| 64 | + repository: HHS/ASPR-ms-util |
| 65 | + path: util |
| 66 | + ref: dev |
| 67 | + |
| 68 | + - name: Get Taskit Version |
| 69 | + if: ${{ endsWith(env.gcm_taskit_version, 'SNAPSHOT') }} |
| 70 | + run: | |
| 71 | + echo "taskit_version=v$(mvn help:evaluate -Dexpression=taskit.version -q -DforceStdout --file gcm-taskit/pom.xml)" >> "$GITHUB_ENV" |
| 72 | +
|
| 73 | + - name: Checkout Taskit |
| 74 | + if: ${{ endsWith(env.taskit_version, 'SNAPSHOT') }} |
| 75 | + uses: actions/checkout@v4 |
| 76 | + with: |
| 77 | + repository: HHS/ASPR-ms-taskit |
| 78 | + path: taskit-core |
| 79 | + ref: dev |
| 80 | + |
| 81 | + - name: Build Util |
| 82 | + if: ${{ endsWith(env.util_version, 'SNAPSHOT') }} |
| 83 | + run: mvn clean install -DskipTests --file util/pom.xml |
| 84 | + |
| 85 | + - name: Build GCM |
| 86 | + if: ${{ endsWith(env.gcm_version, 'SNAPSHOT') }} |
| 87 | + run: mvn clean install -DskipTests --file gcm/pom.xml |
| 88 | + |
| 89 | + - name: Build Taskit |
| 90 | + if: ${{ endsWith(env.taskit_version, 'SNAPSHOT') }} |
| 91 | + run: mvn clean install -DskipTests --file taskit-core/pom.xml |
| 92 | + |
| 93 | + - name: Build GCM Taskit |
| 94 | + if: ${{ endsWith(env.gcm_taskit_version, 'SNAPSHOT') }} |
| 95 | + run: mvn clean install -DskipTests --file gcm-taskit/pom.xml |
| 96 | + |
| 97 | + - name: Build GCM Pipeline |
| 98 | + run: mvn clean install --file pom.xml |
| 99 | + |
| 100 | + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive |
| 101 | + # - name: Update dependency graph |
| 102 | + # uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 |
0 commit comments