File tree Expand file tree Collapse file tree 3 files changed +23
-16
lines changed Expand file tree Collapse file tree 3 files changed +23
-16
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,17 @@ name: Gradle Build
22
33on :
44 push :
5- branches : [ "main" ]
6- paths :
7- - " src/**"
8- - " build.gradle.kts"
9- - " settings.gradle.kts"
10- - " gradle.properties"
11- - " gradle/**"
12- - " buildSrc/**"
13- - " gradlew"
14- - " gradlew.bat"
15- - " .github/workflows/gradle-build.yml"
5+ branches :
6+ - " main"
7+ - " dev"
8+ - " dev/*"
9+ - " feature/*"
10+ - " bugfix/*"
11+ - " release/*"
1612 pull_request :
17- branches : [ "main" ]
13+ branches :
14+ - " main"
15+ - " release/*"
1816
1917jobs :
2018 build :
Original file line number Diff line number Diff line change @@ -2,12 +2,17 @@ name: Dependency Submission
22
33on :
44 push :
5- branches : [ "main" ]
5+ branches :
6+ - " main"
7+ - " release/*"
68 paths :
79 - " build.gradle.kts"
810 - " settings.gradle.kts"
11+ - " gradle.properties"
912 - " gradle/**"
1013 - " buildSrc/**"
14+ - " gradlew"
15+ - " gradlew.bat"
1116 - " .github/workflows/gradle-dependency-submission.yml"
1217
1318jobs :
Original file line number Diff line number Diff line change 44 workflow_dispatch :
55 schedule :
66 - cron : " 0 15 * * 5" # friday 15:00 UTC
7+
78jobs :
89 check-branch :
910 runs-on : ubuntu-latest
1011 steps :
1112 - name : Check Branch
12- if : github.ref != 'refs/heads/main'
13+ if : startsWith( github.ref, 'refs/heads/')
1314 run : |
14- echo "::error title=wrong branch selected::this workflow must be run on the 'main' branch"
15- exit 1
15+ BRANCH="${GITHUB_REF#refs/heads/}"
16+ if [[ "$BRANCH" != "main" && "$BRANCH" != "dev" && "$BRANCH" != dev/* && "$BRANCH" != release/* ]]; then
17+ echo "::error title=wrong branch selected::this workflow must be run on 'main', 'dev/*' or 'release/*' branches"
18+ exit 1
19+ fi
1620
1721 check-updates :
1822 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments