Polish GitHub action names and formatting

This commit is contained in:
Phillip Webb 2024-03-27 11:41:54 -07:00
parent 14fef8c100
commit c158eb258f
4 changed files with 23 additions and 31 deletions

View File

@ -1,4 +1,4 @@
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: webhook-url:

View File

@ -8,28 +8,28 @@ concurrency:
jobs: jobs:
build-and-deploy-snapshot: build-and-deploy-snapshot:
if: ${{ github.repository == 'spring-projects/spring-boot' }} if: ${{ github.repository == 'spring-projects/spring-boot' }}
name: Build and deploy snapshot name: Build and Deploy Snapshot
runs-on: ubuntu22-8-32 runs-on: ubuntu22-8-32
steps: steps:
- name: Set up Java - name: Setup Java
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: 'liberica' distribution: 'liberica'
java-version: 17 java-version: 17
- name: Check out code - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Gradle - name: Set up Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
with: with:
cache-read-only: false cache-read-only: false
- name: Configure Gradle properties - name: Configure Gradle Properties
shell: bash shell: bash
run: | run: |
mkdir -p $HOME/.gradle mkdir -p $HOME/.gradle
echo 'systemProp.user.name=spring-builds+github' >> $HOME/.gradle/gradle.properties echo 'systemProp.user.name=spring-builds+github' >> $HOME/.gradle/gradle.properties
echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
- name: Build and publish - name: Build and Publish
id: build id: build
env: env:
CI: 'true' CI: 'true'
@ -51,7 +51,7 @@ jobs:
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }} signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
artifact-properties: | artifact-properties: |
/**/spring-boot-docs-*.zip::zip.type=docs,zip.deployed=false /**/spring-boot-docs-*.zip::zip.type=docs,zip.deployed=false
- name: Send notification - name: Send Notification
uses: ./.github/actions/send-notification uses: ./.github/actions/send-notification
if: always() if: always()
with: with:
@ -59,7 +59,7 @@ jobs:
status: ${{ job.status }} status: ${{ job.status }}
build-scan-url: ${{ steps.build.outputs.build-scan-url }} build-scan-url: ${{ steps.build.outputs.build-scan-url }}
run-name: ${{ format('{0} | Linux | Java 17', github.ref_name) }} run-name: ${{ format('{0} | Linux | Java 17', github.ref_name) }}
- name: Read version from gradle.properties - name: Read Version From gradle.properties
id: read-version id: read-version
shell: bash shell: bash
run: | run: |
@ -73,43 +73,43 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build-and-deploy-snapshot needs: build-and-deploy-snapshot
steps: steps:
- name: Check out release verification tests - name: Checkout Release Verification Tests
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: spring-projects/spring-boot-release-verification repository: spring-projects/spring-boot-release-verification
ref: 'main' ref: 'main'
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
- name: Check out send notification action - name: Checkout 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: Set up Java - name: Setup Java
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: 'liberica' distribution: 'liberica'
java-version: 17 java-version: 17
- name: Set up Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
with: with:
cache-read-only: false cache-read-only: false
- name: Configure Gradle properties - name: Configure Gradle Properties
shell: bash shell: bash
run: | run: |
mkdir -p $HOME/.gradle mkdir -p $HOME/.gradle
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
- name: Run release verification tests - name: Run Release Verification Tests
env: env:
RVT_VERSION: ${{ needs.build-and-deploy-snapshot.outputs.version }} RVT_VERSION: ${{ needs.build-and-deploy-snapshot.outputs.version }}
RVT_RELEASE_TYPE: oss RVT_RELEASE_TYPE: oss
run: ./gradlew spring-boot-release-verification-tests:test run: ./gradlew spring-boot-release-verification-tests:test
- name: Upload build reports on failure - name: Upload Build Reports on Failure
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: build-reports name: build-reports
path: '**/build/reports/' path: '**/build/reports/'
- name: Send notification - name: Send Notification
uses: ./spring-boot/.github/actions/send-notification uses: ./spring-boot/.github/actions/send-notification
if: always() if: always()
with: with:

View File

@ -6,36 +6,30 @@ permissions:
jobs: jobs:
build: build:
name: Build pull request name: Build Pull Request
runs-on: ubuntu22-8-32 runs-on: ubuntu22-8-32
if: ${{ github.repository == 'spring-projects/spring-boot' }} if: ${{ github.repository == 'spring-projects/spring-boot' }}
steps: steps:
- name: Set up JDK 17 - name: Setup JDK 17
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
java-version: '17' java-version: '17'
distribution: 'liberica' distribution: 'liberica'
- name: Checkout
- name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Validate Gradle Wrapper
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@b231772637bb498f11fdbc86052b6e8a8dc9fc92 uses: gradle/wrapper-validation-action@b231772637bb498f11fdbc86052b6e8a8dc9fc92
- name: Setup Gradle
- name: Set up Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
- 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 uses: ./.github/actions/print-jvm-thread-dumps
if: cancelled() if: cancelled()
- name: Upload Build Reports
- name: Upload build reports
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:

View File

@ -1,9 +1,7 @@
name: "Validate Gradle Wrapper" name: "Validate Gradle Wrapper"
on: [push, pull_request] on: [push, pull_request]
permissions: permissions:
contents: read contents: read
jobs: jobs:
validation: validation:
name: "Validation" name: "Validation"