Skip to content

Commit d1bb705

Browse files
committed
Some workflow tweaks
* Make Gradle Enterprise ENV vars as optional * Add `.due_on != null` condition to avoid not scheduled milestones frm releasing
1 parent 761455f commit d1bb705

4 files changed

+12
-12
lines changed

.github/workflows/spring-artifactory-gradle-release-staging.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ on:
2121
value: ${{ jobs.staging-to-artifactory-with-gradle.outputs.buildNumber }}
2222

2323
secrets:
24-
GH_ACTIONS_REPO_TOKEN:
25-
required: true
2624
GRADLE_ENTERPRISE_CACHE_USER:
27-
required: true
25+
required: false
2826
GRADLE_ENTERPRISE_CACHE_PASSWORD:
29-
required: true
27+
required: false
3028
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY:
29+
required: false
30+
GH_ACTIONS_REPO_TOKEN:
3131
required: true
3232
JF_ARTIFACTORY_SPRING:
3333
required: true

.github/workflows/spring-artifactory-gradle-snapshot.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ on:
1010

1111
secrets:
1212
GRADLE_ENTERPRISE_CACHE_USER:
13-
required: true
13+
required: false
1414
GRADLE_ENTERPRISE_CACHE_PASSWORD:
15-
required: true
15+
required: false
1616
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY:
17-
required: true
17+
required: false
1818
JF_ARTIFACTORY_SPRING:
1919
required: true
2020

.github/workflows/spring-artifactory-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
CURRENT_VERSION=$(gradle properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')
7070
fi
7171
export CANDIDATE_VERSION=${CURRENT_VERSION/-SNAPSHOT}
72-
RELEASE_VERSION=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq 'map(select(.title | startswith(env.CANDIDATE_VERSION))) | .[0] | .title')
72+
RELEASE_VERSION=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq 'map(select(.due_on != null and (.title | startswith(env.CANDIDATE_VERSION)))) | .[0] | .title')
7373
if [ -z $RELEASE_VERSION ]
7474
then
7575
gh run cancel ${{ github.run_id }}

.github/workflows/spring-stage-release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ on:
2121
value: ${{ jobs.build-info.outputs.buildNumber }}
2222

2323
secrets:
24-
GH_ACTIONS_REPO_TOKEN:
25-
required: true
2624
GRADLE_ENTERPRISE_CACHE_USER:
27-
required: true
25+
required: false
2826
GRADLE_ENTERPRISE_CACHE_PASSWORD:
29-
required: true
27+
required: false
3028
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY:
29+
required: false
30+
GH_ACTIONS_REPO_TOKEN:
3131
required: true
3232
JF_ARTIFACTORY_SPRING:
3333
required: true

0 commit comments

Comments
 (0)