Skip to content

Commit b48cf9b

Browse files
committed
Improve verify workflow's handling of secrets
1 parent 3479304 commit b48cf9b

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

.github/workflows/build-and-deploy-snapshot.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ jobs:
4848
name: Verify
4949
needs: build-and-deploy-snapshot
5050
uses: ./.github/workflows/verify.yml
51-
secrets: inherit
51+
secrets:
52+
google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
53+
repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
54+
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
55+
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
5256
with:
5357
version: ${{ needs.build-and-deploy-snapshot.outputs.version }}

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ jobs:
4141
staging: true
4242
version: ${{ needs.build-and-stage-release.outputs.version }}
4343
secrets:
44-
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
44+
google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
4545
repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
46+
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
47+
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
4648
sync-to-maven-central:
4749
name: Sync to Maven Central
4850
needs:

.github/workflows/verify.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,26 @@ on:
1414
required: false
1515
repository-password:
1616
required: false
17+
google-chat-webhook-url:
18+
required: true
19+
token:
20+
required: true
1721
jobs:
1822
verify:
1923
name: Verify
2024
runs-on: ubuntu-latest
2125
steps:
22-
- name: Check Out Release Verification Tests
23-
uses: actions/checkout@v4
24-
with:
25-
repository: spring-projects/spring-boot-release-verification
26-
ref: 'v0.0.2'
27-
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
2826
- name: Check Out Send Notification Action
2927
uses: actions/checkout@v4
3028
with:
3129
path: spring-boot
3230
sparse-checkout: .github/actions/send-notification
31+
- name: Check Out Release Verification Tests
32+
uses: actions/checkout@v4
33+
with:
34+
repository: spring-projects/spring-boot-release-verification
35+
ref: 'v0.0.2'
36+
token: ${{ secrets.token }}
3337
- name: Set Up Java
3438
uses: actions/setup-java@v4
3539
with:
@@ -64,6 +68,6 @@ jobs:
6468
uses: ./spring-boot/.github/actions/send-notification
6569
if: always()
6670
with:
67-
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
71+
webhook-url: ${{ secrets.google-chat-webhook-url }}
6872
status: ${{ job.status }}
6973
run-name: ${{ format('{0} | Verification | {1}', github.ref_name, inputs.version) }}

0 commit comments

Comments
 (0)