Skip to content

Commit cc37f49

Browse files
I-Al-Istannenilluminator3
authored andcommitted
Run workflows with pull requests's version
This ensures we notice a gradle/workflow change is broken *before* it is merged.
1 parent 5db8bb3 commit cc37f49

4 files changed

Lines changed: 20 additions & 8 deletions

File tree

.github/workflows/basic-checks.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Basic checks
22

3-
on: [pull_request_target]
3+
on: [pull_request]
4+
5+
env:
6+
JAVA_VERSION: 16
47

58
jobs:
69
spotless:
@@ -10,7 +13,7 @@ jobs:
1013
- name: Set up JDK
1114
uses: actions/setup-java@v1
1215
with:
13-
java-version: ${{ secrets.JAVA_VERSION }}
16+
java-version: ${{ env.JAVA_VERSION }}
1417
- uses: actions/checkout@v2
1518
with:
1619
fetch-depth: 2
@@ -24,7 +27,7 @@ jobs:
2427
- name: Set up JDK
2528
uses: actions/setup-java@v1
2629
with:
27-
java-version: ${{ secrets.JAVA_VERSION }}
30+
java-version: ${{ env.JAVA_VERSION }}
2831
- uses: actions/checkout@v2
2932
- name: Check
3033
run: ./gradlew test
@@ -40,7 +43,7 @@ jobs:
4043
- name: Set up JDK
4144
uses: actions/setup-java@v1
4245
with:
43-
java-version: ${{ secrets.JAVA_VERSION }}
46+
java-version: ${{ env.JAVA_VERSION }}
4447
- name: Cache SonarCloud packages
4548
uses: actions/cache@v1
4649
with:

.github/workflows/codeql.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
schedule:
1010
- cron: '0 20 * * 4'
1111

12+
env:
13+
JAVA_VERSION: 16
14+
1215
jobs:
1316
analyze:
1417
name: Analyze
@@ -27,7 +30,7 @@ jobs:
2730
- name: Set up JDK
2831
uses: actions/setup-java@v1
2932
with:
30-
java-version: ${{ secrets.JAVA_VERSION }}
33+
java-version: ${{ env.JAVA_VERSION }}
3134
- name: Checkout repository
3235
uses: actions/checkout@v2
3336
with:

.github/workflows/docker-build.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Docker Verify
22

3-
on: [pull_request_target]
3+
on: [pull_request]
4+
5+
env:
6+
JAVA_VERSION: 16
47

58
jobs:
69
docker:
@@ -10,7 +13,7 @@ jobs:
1013
- name: Set up JDK
1114
uses: actions/setup-java@v1
1215
with:
13-
java-version: ${{ secrets.JAVA_VERSION }}
16+
java-version: ${{ env.JAVA_VERSION }}
1417
- uses: actions/checkout@v2
1518
with:
1619
fetch-depth: 0

.github/workflows/docker-publish.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ on:
55
branches:
66
- 'develop'
77

8+
env:
9+
JAVA_VERSION: 16
10+
811
jobs:
912
docker:
1013
runs-on: ubuntu-latest
1114
steps:
1215
- name: Set up JDK
1316
uses: actions/setup-java@v1
1417
with:
15-
java-version: ${{ secrets.JAVA_VERSION }}
18+
java-version: ${{ env.JAVA_VERSION }}
1619
- uses: actions/checkout@v2
1720
with:
1821
fetch-depth: 0

0 commit comments

Comments
 (0)