Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit 5bbfdeb

Browse files
authored
Merge pull request #881 from linwumingshi/ci/job-condition
ci: 👷 Add repository condition to GitHub Action
2 parents 157f107 + 0899ee3 commit 5bbfdeb

5 files changed

Lines changed: 12 additions & 35 deletions

File tree

.github/workflows/build-and-run-example-project.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ env:
1313

1414
jobs:
1515
build:
16-
if: ${{ github.event.pull_request.changed_files > 0 }} # Run this job only if there are file changes
16+
if: ${{ github.repository == 'TongchengOpenSource/smart-doc' && github.event.pull_request.changed_files > 0 }} # Run this job only if there are file changes
1717
runs-on: ubuntu-latest
1818

1919
steps:
2020
- name: Checkout Repository
2121
uses: actions/checkout@v4
2222

23-
- name: Set up JDK 17
23+
- name: Set up JDK 8
2424
uses: actions/setup-java@v4
2525
with:
26-
java-version: '17'
26+
java-version: '8'
2727
distribution: 'temurin'
2828

2929
- name: Update Version in pom.xml
@@ -54,10 +54,10 @@ jobs:
5454
repository: TongchengOpenSource/smart-doc-maven-plugin
5555
token: ${{ secrets.GITHUB_TOKEN }}
5656

57-
- name: Set up JDK 17
57+
- name: Set up JDK 8
5858
uses: actions/setup-java@v4
5959
with:
60-
java-version: '17'
60+
java-version: '8'
6161
distribution: 'temurin'
6262

6363
- name: Download Artifact

.github/workflows/deploy-to-maven-central.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
jobs:
88
deploy:
9+
if: ${{ github.repository == 'TongchengOpenSource/smart-doc' }}
910
runs-on: ubuntu-latest
1011

1112
steps:
@@ -15,7 +16,7 @@ jobs:
1516
- name: Set Up JDK
1617
uses: actions/setup-java@v4
1718
with:
18-
java-version: '11'
19+
java-version: '8'
1920
distribution: 'temurin'
2021

2122
- name: Deploy to Maven Central

.github/workflows/maven.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ on:
1616

1717
jobs:
1818
build:
19-
19+
if: ${{ github.repository == 'TongchengOpenSource/smart-doc' }}
2020
runs-on: ubuntu-latest
2121

2222
steps:
2323
- uses: actions/checkout@v4
24-
- name: Set up JDK 11
24+
- name: Set up JDK 8
2525
uses: actions/setup-java@v4
2626
with:
27-
java-version: '11'
27+
java-version: '8'
2828
distribution: 'temurin'
2929
cache: maven
3030
- name: Setup review

.github/workflows/spring-javaformat-validate.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,12 @@ jobs:
1010
- name: Checkout repository
1111
uses: actions/checkout@v4
1212

13-
- name: Set up JDK 11
13+
- name: Set up JDK 8
1414
uses: actions/setup-java@v4
1515
with:
16-
java-version: '11'
16+
java-version: '8'
1717
distribution: 'temurin'
1818

19-
- name: Install Maven
20-
uses: actions/setup-java@v4
21-
with:
22-
java-version: '11'
23-
distribution: 'temurin'
24-
cache: maven
25-
2619
- name: Execute Spring Java Format Validation
2720
id: format-validation
2821
run: |

.github/workflows/trigger-example-project-update.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)