Skip to content

Commit adcc0bf

Browse files
committed
Build, Test, and Deploy via spring-security-actions
Renames continuous-integration-workflow.yml to ci.yml to align with the commercial branches. Adds a local deploy-schema action since that concern is spring-ldap-specific (spring-security has no schema to deploy, so it doesn't belong in the shared spring-security-actions actions).
1 parent a792352 commit adcc0bf

3 files changed

Lines changed: 96 additions & 60 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy Schema
2+
description: Deploys the schema zip to the docs site
3+
4+
inputs:
5+
java-version:
6+
description: "The Java version to use"
7+
required: false
8+
default: "17"
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Set up JDK ${{ inputs.java-version }}
14+
uses: spring-io/spring-gradle-build-action@c8668747d7c264864c8c7f7026d0d277d14a78dc # v2.0.6
15+
with:
16+
java-version: ${{ inputs.java-version }}
17+
distribution: temurin
18+
- name: Deploy Schema
19+
shell: bash
20+
run: |
21+
./gradlew deploySchema -PdeployDocsSshKey="$DOCS_SSH_KEY" -PdeployDocsSshUsername="$DOCS_USERNAME" -PdeployDocsHost="$DOCS_HOST" --stacktrace --info

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "*.x"
7+
- "release/**"
8+
schedule:
9+
- cron: '0 10 * * *' # Once per day at 10am UTC
10+
workflow_dispatch: # Manual trigger
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
test:
17+
name: Test Against Snapshots
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
21+
- uses: spring-io/spring-security-actions/test@4386090bf7852faa1d61782f981811441757dbb8 # main
22+
with:
23+
java-version: '17'
24+
gradle-args: -PisOverrideVersionCatalog -PtestToolchain=17 -PspringFrameworkVersion=7.+ -PspringDataVersion=2025.0.+
25+
compute-version:
26+
name: Compute Version
27+
runs-on: ubuntu-latest
28+
outputs:
29+
version: ${{ steps.project-version.outputs.version }}
30+
snapshot: ${{ steps.project-version.outputs.snapshot }}
31+
steps:
32+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
33+
- id: project-version
34+
name: Extract Project Version
35+
uses: spring-io/spring-release-actions/compute-version@a1f321783a0769dd2aea4fad6c2ae2f95a52b885 # 0.0.5
36+
build-and-deploy:
37+
name: Build and Deploy
38+
needs: [ test, compute-version ]
39+
if: needs.compute-version.outputs.snapshot == 'true'
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
43+
- uses: spring-io/spring-security-actions/build@4386090bf7852faa1d61782f981811441757dbb8 # main
44+
with:
45+
java-version: '17'
46+
- id: deploy-location
47+
name: Compute Deploy Location
48+
uses: spring-io/spring-release-actions/compute-artifact-repository@a1f321783a0769dd2aea4fad6c2ae2f95a52b885 # 0.0.5
49+
with:
50+
version: ${{ needs.compute-version.outputs.version }}
51+
- name: Deploy Artifacts
52+
uses: spring-io/spring-security-actions/ensure-artifacts@f8ef0d53fc61799c18f19bc6a4c42ccb9aa265de
53+
with:
54+
version: ${{ needs.compute-version.outputs.version }}
55+
username: ${{ secrets.ARTIFACTORY_USERNAME }}
56+
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
57+
repository-uri: ${{ steps.deploy-location.outputs.uri }}
58+
repository-name: ${{ steps.deploy-location.outputs.name }}
59+
project: ${{ steps.deploy-location.outputs.project }}
60+
local-repository: build/publications/repos
61+
artifact-path: org/springframework/ldap/spring-ldap-core
62+
deploy-schema:
63+
name: Deploy Schema
64+
needs: [ test, compute-version ]
65+
if: needs.compute-version.outputs.snapshot == 'true'
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
69+
- uses: ./.github/actions/deploy-schema
70+
with:
71+
java-version: '17'
72+
env:
73+
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
74+
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
75+
DOCS_HOST: ${{ secrets.DOCS_HOST }}

.github/workflows/continuous-integration-workflow.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)