Skip to content

Commit

Permalink
Refactor dynamic workflow (#33731)
Browse files Browse the repository at this point in the history
* Add commit id support for dynamic ci

* Add commit id support for dynamic ci

* Refactor : refactor the chckout action for dynamic ci

* Refactor : update the inputs set order
  • Loading branch information
taojintianxia authored Nov 20, 2024
1 parent 6828ec8 commit a056e69
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/nightly-ci-dynamic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ name: Nightly - CI Dynamic
on:
workflow_dispatch:
inputs:
os:
description: 'System OS'
required: false
default: "[ 'ubuntu-latest' ]"
java-version:
description: 'JDK Version'
required: false
default: "[ '21' ]"
os:
description: 'System OS'
commit-id:
description: 'Commit ID'
required: false
default: "[ 'ubuntu-latest' ]"
default: "[ '' ]"
job:
description: 'Job Name'
required: true
Expand All @@ -53,11 +57,14 @@ jobs:
matrix:
os: ${{ fromJson(github.event.inputs.os) }}
java-version: ${{ fromJson(github.event.inputs.java-version) }}
commit-id: ${{ fromJson(github.event.inputs.commit-id) }}
steps:
- name: Support Long Paths in Windows
if: matrix.os == 'windows-latest'
run: git config --global core.longpaths true
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
Expand All @@ -69,6 +76,9 @@ jobs:
restore-keys: |
${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-cache-
${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-
- name: Checkout with Commit ID
if: matrix.commit-id != ''
run: git checkout ${{ matrix.commit-id }}
- name: Build Project with Maven
run: ./mvnw clean install -B -ntp -T1C
- name: Build Examples with Maven
Expand Down

0 comments on commit a056e69

Please sign in to comment.