forked from lucee/extension-hibernate
-
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.
🤖 CI: Re-organize source formatter in CI build to fix env var
- Loading branch information
1 parent
6ba5d69
commit 32c9d9a
Showing
3 changed files
with
50 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,48 +29,13 @@ jobs: | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
uses: ./.github/workflows/tests.yml | ||
|
||
formatJava: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[ci skip]') && env.SNAPSHOT == 'true'" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
|
||
- name: Validate Java format | ||
run: mvn --batch-mode -f pom.xml formatter:validate | ||
|
||
- name: Commit Java Formatting Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: '👌 IMPROVE: Apply mvn formatter:format changes - [ci skip]' | ||
|
||
formatCFML: | ||
runs-on: ubuntu-latest | ||
needs: [ formatJava ] | ||
if: "!contains(github.event.head_commit.message, '[ci skip]') && env.SNAPSHOT == 'true'" | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: Ortus-Solutions/[email protected] | ||
with: | ||
cmd: run-script format | ||
|
||
- name: Commit Format Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: '👌 IMPROVE: Apply cfformat changes - [ci skip]' | ||
|
||
|
||
format: | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
uses: ./.github/workflows/format.yml | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [ tests, formatJava, formatCFML ] | ||
needs: [ tests, format ] | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
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,45 @@ | ||
name: Format Java and CFML Source Code | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
SNAPSHOT: ${{ github.ref_name != 'main' && github.ref_name != 'master' }} | ||
|
||
jobs: | ||
formatJava: | ||
runs-on: ubuntu-latest | ||
if: ${{ env.SNAPSHOT == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
|
||
- name: Validate Java format | ||
run: mvn --batch-mode -f pom.xml formatter:validate | ||
|
||
- name: Commit Java Formatting Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: '👌 IMPROVE: Apply mvn formatter:format changes - [ci skip]' | ||
|
||
formatCFML: | ||
runs-on: ubuntu-latest | ||
needs: [ formatJava ] | ||
if: ${{ env.SNAPSHOT == 'true' }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: Ortus-Solutions/[email protected] | ||
with: | ||
cmd: run-script format | ||
|
||
- name: Commit Format Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: '👌 IMPROVE: Apply cfformat changes - [ci skip]' |
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 |
---|---|---|
|
@@ -47,6 +47,6 @@ jobs: | |
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: Ortus-Solutions/[email protected].2 | ||
- uses: Ortus-Solutions/[email protected].3 | ||
with: | ||
cmd: run-script format:check |