16 changed files with 151 additions and 143 deletions
@ -1,27 +1,27 @@ |
|||||||
name: Create GitHub Release |
name: Create GitHub Release |
||||||
description: Create the release on GitHub with a changelog |
description: 'Create the release on GitHub with a changelog' |
||||||
inputs: |
inputs: |
||||||
milestone: |
milestone: |
||||||
description: Name of the GitHub milestone for which a release will be created |
description: 'Name of the GitHub milestone for which a release will be created' |
||||||
required: true |
|
||||||
token: |
|
||||||
description: Token to use for authentication with GitHub |
|
||||||
required: true |
required: true |
||||||
pre-release: |
pre-release: |
||||||
description: Whether the release is a pre-release (a milestone or release candidate) |
description: 'Whether the release is a pre-release (a milestone or release candidate)' |
||||||
required: false |
required: false |
||||||
default: 'false' |
default: 'false' |
||||||
|
token: |
||||||
|
description: 'Token to use for authentication with GitHub' |
||||||
|
required: true |
||||||
runs: |
runs: |
||||||
using: composite |
using: composite |
||||||
steps: |
steps: |
||||||
- name: Generate Changelog |
- name: Generate Changelog |
||||||
uses: spring-io/github-changelog-generator@185319ad7eaa75b0e8e72e4b6db19c8b2cb8c4c1 #v0.0.11 |
uses: spring-io/github-changelog-generator@185319ad7eaa75b0e8e72e4b6db19c8b2cb8c4c1 #v0.0.11 |
||||||
with: |
with: |
||||||
|
config-file: .github/actions/create-github-release/changelog-generator.yml |
||||||
milestone: ${{ inputs.milestone }} |
milestone: ${{ inputs.milestone }} |
||||||
token: ${{ inputs.token }} |
token: ${{ inputs.token }} |
||||||
config-file: .github/actions/create-github-release/changelog-generator.yml |
|
||||||
- name: Create GitHub Release |
- name: Create GitHub Release |
||||||
|
shell: bash |
||||||
env: |
env: |
||||||
GITHUB_TOKEN: ${{ inputs.token }} |
GITHUB_TOKEN: ${{ inputs.token }} |
||||||
shell: bash |
|
||||||
run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md ${{ inputs.pre-release == 'true' && '--prerelease' || '' }} |
run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md ${{ inputs.pre-release == 'true' && '--prerelease' || '' }} |
||||||
|
|||||||
@ -1,33 +1,39 @@ |
|||||||
name: Send Notification |
name: Send Notification |
||||||
description: Sends a Google Chat message as a notification of the job's outcome |
description: 'Sends a Google Chat message as a notification of the job''s outcome' |
||||||
inputs: |
inputs: |
||||||
webhook-url: |
|
||||||
description: 'Google Chat Webhook URL' |
|
||||||
required: true |
|
||||||
status: |
|
||||||
description: 'Status of the job' |
|
||||||
required: true |
|
||||||
build-scan-url: |
build-scan-url: |
||||||
description: 'URL of the build scan to include in the notification' |
description: 'URL of the build scan to include in the notification' |
||||||
|
required: false |
||||||
run-name: |
run-name: |
||||||
description: 'Name of the run to include in the notification' |
description: 'Name of the run to include in the notification' |
||||||
|
required: false |
||||||
default: ${{ format('{0} {1}', github.ref_name, github.job) }} |
default: ${{ format('{0} {1}', github.ref_name, github.job) }} |
||||||
|
status: |
||||||
|
description: 'Status of the job' |
||||||
|
required: true |
||||||
|
webhook-url: |
||||||
|
description: 'Google Chat Webhook URL' |
||||||
|
required: true |
||||||
runs: |
runs: |
||||||
using: composite |
using: composite |
||||||
steps: |
steps: |
||||||
- shell: bash |
- name: Prepare Variables |
||||||
|
shell: bash |
||||||
run: | |
run: | |
||||||
echo "BUILD_SCAN=${{ inputs.build-scan-url == '' && ' [build scan unavailable]' || format(' [<{0}|Build Scan>]', inputs.build-scan-url) }}" >> "$GITHUB_ENV" |
echo "BUILD_SCAN=${{ inputs.build-scan-url == '' && ' [build scan unavailable]' || format(' [<{0}|Build Scan>]', inputs.build-scan-url) }}" >> "$GITHUB_ENV" |
||||||
echo "RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_ENV" |
echo "RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_ENV" |
||||||
- shell: bash |
- name: Success Notification |
||||||
if: ${{ inputs.status == 'success' }} |
if: ${{ inputs.status == 'success' }} |
||||||
|
shell: bash |
||||||
run: | |
run: | |
||||||
curl -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was successful ${{ env.BUILD_SCAN }}"}' || true |
curl -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was successful ${{ env.BUILD_SCAN }}"}' || true |
||||||
- shell: bash |
- name: Failure Notification |
||||||
if: ${{ inputs.status == 'failure' }} |
if: ${{ inputs.status == 'failure' }} |
||||||
|
shell: bash |
||||||
run: | |
run: | |
||||||
curl -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d '{ text: "<users/all> *<${{ env.RUN_URL }}|${{ inputs.run-name }}> failed* ${{ env.BUILD_SCAN }}"}' || true |
curl -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d '{ text: "<users/all> *<${{ env.RUN_URL }}|${{ inputs.run-name }}> failed* ${{ env.BUILD_SCAN }}"}' || true |
||||||
- shell: bash |
- name: Cancel Notification |
||||||
if: ${{ inputs.status == 'cancelled' }} |
if: ${{ inputs.status == 'cancelled' }} |
||||||
|
shell: bash |
||||||
run: | |
run: | |
||||||
curl -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was cancelled"}' || true |
curl -X POST '${{ inputs.webhook-url }}' -H 'Content-Type: application/json' -d '{ text: "<${{ env.RUN_URL }}|${{ inputs.run-name }}> was cancelled"}' || true |
||||||
|
|||||||
@ -1,38 +1,36 @@ |
|||||||
name: Build Pull Request |
name: Build Pull Request |
||||||
on: pull_request |
on: pull_request |
||||||
|
|
||||||
permissions: |
permissions: |
||||||
contents: read |
contents: read |
||||||
|
|
||||||
jobs: |
jobs: |
||||||
build: |
build: |
||||||
name: Build Pull Request |
name: Build Pull Request |
||||||
|
if: ${{ github.repository == 'spring-projects/spring-framework' }} |
||||||
runs-on: ubuntu-latest |
runs-on: ubuntu-latest |
||||||
timeout-minutes: 60 |
timeout-minutes: 60 |
||||||
if: ${{ github.repository == 'spring-projects/spring-framework' }} |
|
||||||
steps: |
steps: |
||||||
- name: Set up JDK 17 |
- name: Set Up JDK 17 |
||||||
uses: actions/setup-java@v4 |
uses: actions/setup-java@v4 |
||||||
with: |
with: |
||||||
java-version: '17' |
|
||||||
distribution: 'liberica' |
distribution: 'liberica' |
||||||
|
java-version: '17' |
||||||
- name: Check Out |
- name: Check Out |
||||||
uses: actions/checkout@v4 |
uses: actions/checkout@v4 |
||||||
- name: Validate Gradle Wrapper |
- name: Validate Gradle Wrapper |
||||||
uses: gradle/actions/wrapper-validation@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0 |
uses: gradle/actions/wrapper-validation@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 |
||||||
- name: Set Up Gradle |
- name: Set Up Gradle |
||||||
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0 |
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 |
||||||
- name: Build |
- name: Build |
||||||
env: |
env: |
||||||
CI: 'true' |
CI: 'true' |
||||||
GRADLE_ENTERPRISE_URL: 'https://ge.spring.io' |
GRADLE_ENTERPRISE_URL: 'https://ge.spring.io' |
||||||
run: ./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --no-parallel --continue build |
run: ./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --no-parallel --continue build |
||||||
- name: Print JVM Thread Dumps When Cancelled |
- name: Print JVM Thread Dumps When Cancelled |
||||||
uses: ./.github/actions/print-jvm-thread-dumps |
|
||||||
if: cancelled() |
if: cancelled() |
||||||
|
uses: ./.github/actions/print-jvm-thread-dumps |
||||||
- name: Upload Build Reports |
- name: Upload Build Reports |
||||||
uses: actions/upload-artifact@v4 |
|
||||||
if: failure() |
if: failure() |
||||||
|
uses: actions/upload-artifact@v4 |
||||||
with: |
with: |
||||||
name: build-reports |
name: build-reports |
||||||
path: '**/build/reports/' |
path: '**/build/reports/' |
||||||
|
|||||||
@ -1,11 +0,0 @@ |
|||||||
name: "Validate Gradle Wrapper" |
|
||||||
on: [push, pull_request] |
|
||||||
permissions: |
|
||||||
contents: read |
|
||||||
jobs: |
|
||||||
validation: |
|
||||||
name: "Validate Gradle Wrapper" |
|
||||||
runs-on: ubuntu-latest |
|
||||||
steps: |
|
||||||
- uses: actions/checkout@v4 |
|
||||||
- uses: gradle/actions/wrapper-validation@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0 |
|
||||||
Loading…
Reference in new issue