-
Notifications
You must be signed in to change notification settings - Fork 17
96 lines (89 loc) · 3.28 KB
/
publish-public-operator-docker-image.yaml
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
93
94
95
96
name: Publish Public Operator
run-name: ${{ format('Publish {0} Public Operator', inputs.release_type) }}
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: The type of release
options:
- Snapshot
- Patch
- Minor
- Major
version_number_input:
description: If set, the version number will not be incremented and the given number will be used.
type: string
default: ''
vulnerability_severity:
description: The severity to fail the workflow if such vulnerability is detected. DO NOT override it unless a Jira ticket is raised.
type: choice
options:
- CRITICAL,HIGH
- CRITICAL,HIGH,MEDIUM
- CRITICAL (DO NOT use if JIRA ticket not raised)
workflow_call:
inputs:
release_type:
description: The type of version number to return. Must be one of [Snapshot, Patch, Minor or Major]
required: true
type: string
version_number_input:
description: If set, the version number will not be incremented and the given number will be used.
type: string
default: ''
vulnerability_severity:
description: The severity to fail the workflow if such vulnerability is detected. DO NOT override it unless a Jira ticket is raised. Must be one of ['CRITICAL', 'CRITICAL,HIGH' or 'CRITICAL,HIGH,MEDIUM'] (without space in between).
type: string
default: 'CRITICAL,HIGH'
outputs:
image_tag:
description: The tag used to describe the image in Docker
value: ${{ jobs.Image.outputs.image_tag }}
jobs:
check_major:
name: Check if major release
runs-on: ubuntu-latest
steps:
- name: Approve Major release
if: inputs.release_type == 'Major'
uses: trstringer/manual-approval@v1
with:
secret: ${{ github.token }}
approvers: thomasm-ttd,atarassov-ttd,cody-constine-ttd
minimum-approvals: 1
issue-title: Creating Major version of UID2-Operator
image:
name: Image
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-java-to-docker-versioned.yaml@v3
needs: check_major
with:
release_type: ${{ inputs.release_type }}
version_number_input: ${{ inputs.version_number_input }}
force_release: 'no' # Do not create a release for the component builds, will be created by the parent
vulnerability_severity: ${{ inputs.vulnerability_severity }}
java_version: 21
secrets: inherit
e2e:
name: E2E
uses: ./.github/workflows/run-e2e-tests-on-operator.yaml
needs: image
with:
operator_image_version: ${{ needs.image.outputs.image_tag }}
secrets: inherit
collectPublicArtifacts:
name: Collect Public Artifacts
runs-on: ubuntu-latest
needs: [e2e,image]
steps:
- name: Collect artifacts
run: |
mkdir -p image-details
IMAGE_TAG=${{ needs.image.outputs.image_tag }}
IMAGE=$(jq -n --arg img "$IMAGE_TAG" '{image_tag: $img}')
echo $IMAGE > image-details/public-image-$IMAGE_TAG.json
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: public-image-${{ needs.image.outputs.image_tag }}
path: image-details/