Skip to content

Commit ae8392a

Browse files
committed
Update workflows
1 parent cacbd51 commit ae8392a

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

.github/workflows/gradle-build.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@ name: Gradle Build
22

33
on:
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

1917
jobs:
2018
build:

.github/workflows/gradle-dependency-submission.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ name: Dependency Submission
22

33
on:
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

1318
jobs:

.github/workflows/gradle-publish-snapshot.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ on:
44
workflow_dispatch:
55
schedule:
66
- cron: "0 15 * * 5" # friday 15:00 UTC
7+
78
jobs:
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

0 commit comments

Comments
 (0)