-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yml
More file actions
59 lines (53 loc) · 2.13 KB
/
deploy.yml
File metadata and controls
59 lines (53 loc) · 2.13 KB
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
# Example caller workflow for Spring Cloud projects
# Copy this file to your project's .github/workflows/deploy.yml
# and customize the branch names in the 'on.push.branches' section
#
# Note: The 'branches' input accepts either a single branch name or a comma-separated
# list of branches (e.g., "main,3.3.x,3.2.x") for building multiple branches in one run.
name: Spring Cloud CI Job
on:
push:
branches:
- main
- 4.3.x
# Add other branches that should trigger builds on push
# Scheduled builds run daily at midnight UTC
# The reusable workflow will build all branches defined in the config
schedule:
- cron: '0 0 * * *'
# Manual trigger with optional inputs
workflow_dispatch:
inputs:
branches:
description: 'Which branch(es) should be built - single branch or comma-separated list (e.g., "main,3.3.x,3.2.x")'
required: false
default: ''
type: string
runs_on:
description: 'Runner to use for the build job (defaults to ubuntu-latest)'
required: false
default: 'ubuntu-latest'
type: string
jobs:
deploy:
uses: spring-cloud/spring-cloud-github-actions/.github/workflows/deploy.yml@main
with:
branches: ${{ inputs.branches }}
runs_on: ${{ inputs.runs_on }}
# Optional: Custom build command to override the default Maven deploy command
# Supports both single-line and multi-line commands
# Single-line example:
# custom_build_command: './mvnw clean install -B'
# Multi-line example:
# custom_build_command: |
# ./mvnw clean install -B
# ./mvnw verify -B
# echo "Build completed"
secrets:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
# Required for commercial repositories (e.g., *-commercial)
# COMMERCIAL_ARTIFACTORY_USERNAME: ${{ secrets.COMMERCIAL_ARTIFACTORY_USERNAME }}
# COMMERCIAL_ARTIFACTORY_PASSWORD: ${{ secrets.COMMERCIAL_ARTIFACTORY_PASSWORD }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}