Move verification into reusable workflow
Closes gh-40350
This commit is contained in:
53
.github/workflows/build-and-deploy-snapshot.yml
vendored
53
.github/workflows/build-and-deploy-snapshot.yml
vendored
@@ -68,51 +68,10 @@ jobs:
|
|||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.read-version.outputs.version }}
|
version: ${{ steps.read-version.outputs.version }}
|
||||||
run-verification-tests:
|
verify:
|
||||||
name: Verify ${{ needs.build-and-deploy-snapshot.outputs.version }}
|
name: Verify
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build-and-deploy-snapshot
|
needs: build-and-deploy-snapshot
|
||||||
steps:
|
uses: .github/workflows/verify.yml
|
||||||
- name: Check Out Release Verification Tests
|
secrets: inherit
|
||||||
uses: actions/checkout@v4
|
with:
|
||||||
with:
|
version: ${{ needs.build-and-deploy-snapshot.outputs.version }}
|
||||||
repository: spring-projects/spring-boot-release-verification
|
|
||||||
ref: 'main'
|
|
||||||
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
|
||||||
- name: Check Out Send Notification Action
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
path: spring-boot
|
|
||||||
sparse-checkout: .github/actions/send-notification
|
|
||||||
- name: Set Up Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'liberica'
|
|
||||||
java-version: 17
|
|
||||||
- name: Set Up Gradle
|
|
||||||
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78
|
|
||||||
with:
|
|
||||||
cache-read-only: false
|
|
||||||
- name: Configure Gradle Properties
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p $HOME/.gradle
|
|
||||||
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
|
|
||||||
- name: Run Release Verification Tests
|
|
||||||
env:
|
|
||||||
RVT_VERSION: ${{ needs.build-and-deploy-snapshot.outputs.version }}
|
|
||||||
RVT_RELEASE_TYPE: oss
|
|
||||||
run: ./gradlew spring-boot-release-verification-tests:test
|
|
||||||
- name: Upload Build Reports on Failure
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: build-reports
|
|
||||||
path: '**/build/reports/'
|
|
||||||
- name: Send Notification
|
|
||||||
uses: ./spring-boot/.github/actions/send-notification
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
|
|
||||||
status: ${{ job.status }}
|
|
||||||
run-name: ${{ format('{0} | Verification | {1}', github.ref_name, needs.build-and-deploy-snapshot.outputs.version) }}
|
|
||||||
|
|||||||
55
.github/workflows/verify.yml
vendored
Normal file
55
.github/workflows/verify.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
name: Verify
|
||||||
|
on:
|
||||||
|
workflow-call:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
jobs:
|
||||||
|
verify:
|
||||||
|
name: Verify
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check Out Release Verification Tests
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: spring-projects/spring-boot-release-verification
|
||||||
|
ref: 'main'
|
||||||
|
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
||||||
|
- name: Check Out Send Notification Action
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: spring-boot
|
||||||
|
sparse-checkout: .github/actions/send-notification
|
||||||
|
- name: Set Up Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: 'liberica'
|
||||||
|
java-version: 17
|
||||||
|
- name: Set Up Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 #v3.2.1
|
||||||
|
with:
|
||||||
|
cache-read-only: false
|
||||||
|
- name: Configure Gradle Properties
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p $HOME/.gradle
|
||||||
|
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
|
||||||
|
- name: Run Release Verification Tests
|
||||||
|
env:
|
||||||
|
RVT_VERSION: ${{ inputs.version }}
|
||||||
|
RVT_RELEASE_TYPE: oss
|
||||||
|
run: ./gradlew spring-boot-release-verification-tests:test
|
||||||
|
- name: Upload Build Reports on Failure
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: build-reports
|
||||||
|
path: '**/build/reports/'
|
||||||
|
- name: Send Notification
|
||||||
|
uses: ./spring-boot/.github/actions/send-notification
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
|
||||||
|
status: ${{ job.status }}
|
||||||
|
run-name: ${{ format('{0} | Verification | {1}', github.ref_name, inputs.version) }}
|
||||||
Reference in New Issue
Block a user