Skip to content

Commit 463d319

Browse files
committed
Polishing.
Reuse Spring Data GitHub actions, extract Vault setup into reusable action. See gh-948
1 parent 93c1d1c commit 463d319

File tree

4 files changed

+24
-32
lines changed

4 files changed

+24
-32
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Setup and Start Vault
2+
description: 'Download and start a Vault server'
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Cache Vault
8+
uses: actions/[email protected]
9+
with:
10+
path: |
11+
download
12+
vault
13+
key: ${{ runner.os }}-vault-${{ hashFiles('src/test/bash/**') }}
14+
- name: Install and Start Vault
15+
shell: bash
16+
run: src/test/bash/start.sh

.github/workflows/ci.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,17 @@ jobs:
1010
build-java:
1111
strategy:
1212
matrix:
13-
java-version: [ 'base' ]
13+
java-version: [ 'base', 'next' ]
1414
name: Build project
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v6
1818
- name: Setup Java and Maven
19-
uses: spring-projects/spring-data-release/actions/setup-maven@main
19+
uses: spring-projects/spring-data-build/actions/setup-maven@3.5.x
2020
with:
2121
java-version: '${{ matrix.java-version }}'
2222
develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}'
23-
- name: Cache Vault
24-
uses: actions/[email protected]
25-
with:
26-
path: |
27-
download
28-
vault
29-
key: ${{ runner.os }}-vault-${{ hashFiles('src/test/bash/**') }}
3023
- name: Install and Start Vault
31-
run: src/test/bash/start.sh
24+
uses: ./.github/actions/setup-vault
3225
- name: Build
33-
run: ./mvnw -B -U clean verify
34-
- name: Test Summary
35-
uses: test-summary/[email protected]
36-
with:
37-
paths: '**/TEST-*.xml'
38-
if: always()
26+
uses: spring-projects/spring-data-build/actions/[email protected]

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v6
1717
- name: Setup Java and Maven
18-
uses: spring-projects/spring-data-release/actions/setup-maven@main
18+
uses: spring-projects/spring-data-release/actions/setup-maven@3.5.x
1919
with:
2020
java-version: 'base'
2121
develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}'

.github/workflows/snapshots.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,20 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v6
1515
- name: Setup Java and Maven
16-
uses: spring-projects/spring-data-release/actions/setup-maven@main
16+
uses: spring-projects/spring-data-release/actions/setup-maven@3.5.x
1717
with:
1818
java-version: 'base'
1919
develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}'
20-
- name: Cache Vault
21-
uses: actions/[email protected]
22-
with:
23-
path: |
24-
download
25-
vault
26-
key: ${{ runner.os }}-vault-${{ hashFiles('src/test/bash/**') }}
2720
- name: Install and Start Vault
28-
run: src/test/bash/start.sh
21+
uses: ./.github/actions/setup-vault
2922
- name: Capture version
3023
run: |
3124
echo "PROJECT_VERSION=$(./ci/get-version.sh)" >> $GITHUB_ENV
3225
- name: Deploy to Artifactory
3326
if: ${{ github.repository_owner == 'spring-projects' && contains(env.PROJECT_VERSION, '-SNAPSHOT') }}
34-
uses: spring-projects/spring-data-release/actions/maven-artifactory-deploy@main
27+
uses: spring-projects/spring-data-build/actions/maven-artifactory-deploy@3.5.x
3528
with:
3629
build-name: 'spring-vault'
3730
skip-tests: 'false'
3831
username: '${{ secrets.ARTIFACTORY_USERNAME }}'
3932
password: '${{ secrets.ARTIFACTORY_PASSWORD }}'
40-
- name: Test Summary
41-
uses: test-summary/[email protected]
42-
with:
43-
paths: '**/TEST-*.xml'
44-
if: always()

0 commit comments

Comments
 (0)