Browse Source

Improve verify workflow's handling of secrets

3.1.x
Andy Wilkinson 2 years ago
parent
commit
b48cf9b5a8
  1. 6
      .github/workflows/build-and-deploy-snapshot.yml
  2. 4
      .github/workflows/release.yml
  3. 18
      .github/workflows/verify.yml

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

@ -48,6 +48,10 @@ jobs:
name: Verify name: Verify
needs: build-and-deploy-snapshot needs: build-and-deploy-snapshot
uses: ./.github/workflows/verify.yml uses: ./.github/workflows/verify.yml
secrets: inherit secrets:
google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
with: with:
version: ${{ needs.build-and-deploy-snapshot.outputs.version }} version: ${{ needs.build-and-deploy-snapshot.outputs.version }}

4
.github/workflows/release.yml

@ -41,8 +41,10 @@ jobs:
staging: true staging: true
version: ${{ needs.build-and-stage-release.outputs.version }} version: ${{ needs.build-and-stage-release.outputs.version }}
secrets: secrets:
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }} google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }} repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
sync-to-maven-central: sync-to-maven-central:
name: Sync to Maven Central name: Sync to Maven Central
needs: needs:

18
.github/workflows/verify.yml

@ -14,22 +14,26 @@ on:
required: false required: false
repository-password: repository-password:
required: false required: false
google-chat-webhook-url:
required: true
token:
required: true
jobs: jobs:
verify: verify:
name: Verify name: Verify
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check Out Release Verification Tests
uses: actions/checkout@v4
with:
repository: spring-projects/spring-boot-release-verification
ref: 'v0.0.2'
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
- name: Check Out Send Notification Action - name: Check Out Send Notification Action
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
path: spring-boot path: spring-boot
sparse-checkout: .github/actions/send-notification sparse-checkout: .github/actions/send-notification
- name: Check Out Release Verification Tests
uses: actions/checkout@v4
with:
repository: spring-projects/spring-boot-release-verification
ref: 'v0.0.2'
token: ${{ secrets.token }}
- name: Set Up Java - name: Set Up Java
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
@ -64,6 +68,6 @@ jobs:
uses: ./spring-boot/.github/actions/send-notification uses: ./spring-boot/.github/actions/send-notification
if: always() if: always()
with: with:
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }} webhook-url: ${{ secrets.google-chat-webhook-url }}
status: ${{ job.status }} status: ${{ job.status }}
run-name: ${{ format('{0} | Verification | {1}', github.ref_name, inputs.version) }} run-name: ${{ format('{0} | Verification | {1}', github.ref_name, inputs.version) }}

Loading…
Cancel
Save