-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (56 loc) · 2.17 KB
/
release-for-testing.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
#Release new docker image to ECR as well as schema (if contains any changes) to Nexus (use for testing ONLY)
name: Release for testing
on:
workflow_call:
inputs:
runner:
description: Runner to run the workflow
required: false
type: string
default: 'ubuntu-latest'
additional-gradle-args:
description: 'Additional arguments to pass to the Gradle commands'
required: false
type: string
default: ""
outputs:
version:
description: Version number of the image released to ECR
value: ${{ jobs.build.outputs.version }}
jobs:
build:
runs-on: ${{ inputs.runner }}
env:
IS_DEFAULT_BRANCH: ${{ contains('refs/heads/main, refs/heads/master', github.ref) }}
secrets: ${{ toJSON(secrets) }}
outputs:
version: ${{ steps.format-version.outputs.version }}
steps:
- id: setup-build-environment
name: "Setup build environment"
uses: sympower/sympower-composite-actions/[email protected]
with:
secrets: ${{ env.secrets }}
- id: format-version
name: "Format version"
uses: sympower/sympower-composite-actions/[email protected]
with:
style-as-release: ${{ env.IS_DEFAULT_BRANCH }}
- id: build-and-upload-docker-image
name: "Build and upload Docker Image"
uses: sympower/sympower-composite-actions/[email protected]
with:
version: ${{ steps.format-version.outputs.version }}
additional-gradle-args: ${{ inputs.additional-gradle-args }}
- id: upload-build-artifacts
name: "Upload build artifacts"
if: always()
uses: sympower/sympower-composite-actions/[email protected]
- id: deploy-staging
name: "Deploy to testing environment"
uses: sympower/sympower-composite-actions/[email protected]
with:
secrets: ${{ env.secrets }}
version: ${{ steps.format-version.outputs.version }}
deploy-group: testing
require-approval: false