-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (82 loc) · 2.86 KB
/
spring-artifactory-gradle-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CI Artifactory Build for Gradle
on:
workflow_call:
inputs:
releaseVersion:
description: 'Release version like 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc. If not specified this workflow acts as a SNAPSHOT build.'
required: false
type: string
gradleTasks:
description: 'Additional Gradle tasks. The `build` and `publishAllPublicationsToDeploymentRepository` are included.'
required: false
type: string
artifactoryUrl:
description: 'The Artifactory Server'
required: false
type: string
targetRepository:
description: 'The Artifactory Repository to upload artifacts to'
required: false
type: string
artifactoryProjectKey:
description: 'The Artifactory project key'
required: false
type: string
runner:
description: 'The runner for job'
required: false
type: string
default: ubuntu-latest
outputs:
buildName:
description: 'Artifactory Build Name'
value: ${{ jobs.build-with-gradle.outputs.buildName }}
buildNumber:
description: 'Artifactory Build Number'
value: ${{ jobs.build-with-gradle.outputs.buildNumber }}
secrets:
DEVELOCITY_ACCESS_KEY:
required: false
ARTIFACTORY_USERNAME:
required: true
ARTIFACTORY_PASSWORD:
required: true
GPG_PASSPHRASE:
required: false
GPG_PRIVATE_KEY:
required: false
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
WORKFLOWS_REF: main
jobs:
build-with-gradle:
runs-on: ${{ inputs.runner }}
name: CI Build for ${{ github.ref_name }}
outputs:
buildName: ${{ steps.build-and-publish.outputs.buildName }}
buildNumber: ${{ steps.build-and-publish.outputs.buildNumber }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Checkout Common Repo
uses: actions/checkout@v4
with:
repository: spring-io/spring-github-workflows
path: spring-github-workflows
show-progress: false
ref: ${{ env.WORKFLOWS_REF }}
- name: Build and Publish
id: build-and-publish
timeout-minutes: 30
uses: ./spring-github-workflows/.github/actions/spring-artifactory-gradle-build
with:
releaseVersion: ${{ inputs.releaseVersion }}
gradleTasks: ${{ inputs.gradleTasks }}
artifactoryUrl: ${{ inputs.artifactoryUrl }}
targetRepository: ${{ inputs.targetRepository }}
artifactoryProjectKey: ${{ inputs.artifactoryProjectKey }}
artifactoryUsername: ${{ secrets.ARTIFACTORY_USERNAME }}
artifactoryPassword: ${{ secrets.ARTIFACTORY_PASSWORD }}
gpgPrivateKey: ${{ secrets.GPG_PRIVATE_KEY }}
gpgPassphrase: ${{ secrets.GPG_PASSPHRASE }}