Skip to content

Commit 619c970

Browse files
Update publish-all-operators.yaml
1 parent 88cd9e2 commit 619c970

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/publish-all-operators.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,24 @@ on:
2121
schedule:
2222
- cron: "0 0 * * *"
2323

24-
env:
25-
RELEASE_TYPE: ${{ inputs.release_type || (github.event_name == 'schedule' && 'patch') }}
26-
VULNERABILITY_SEVERITY: ${{ env.VULNERABILITY_SEVERITY || (github.event_name == 'schedule' && 'CRITICAL,HIGH') }}
27-
2824
jobs:
2925
start:
3026
name: Start Operator Build
3127
runs-on: ubuntu-latest
3228
outputs:
3329
new_version: ${{ steps.version.outputs.new_version }}
3430
commit_sha: ${{ steps.commit-and-tag.outputs.commit_sha }}
31+
env:
32+
RELEASE_TYPE: ${{ inputs.release_type || (github.event_name == 'schedule' && 'patch') }}
33+
VULNERABILITY_SEVERITY: ${{ env.VULNERABILITY_SEVERITY || (github.event_name == 'schedule' && 'CRITICAL,HIGH') }}
3534
steps:
35+
- name: Set Environment Variables
36+
id: set-env
37+
run: |
38+
echo "release_type=${{ inputs.release_type || (github.event_name == 'schedule' && 'patch') }}" >> $GITHUB_ENV
39+
echo "vulnerability_severity=${{ inputs.vulnerability_severity || (github.event_name == 'schedule' && 'CRITICAL,HIGH') }}" >> $GITHUB_ENV
40+
echo "release_type=${RELEASE_TYPE}" >> $GITHUB_OUTPUT
41+
echo "vulnerability_severity=${VULNERABILITY_SEVERITY}" >> $GITHUB_OUTPUT
3642
- name: Approve Major release
3743
if: env.RELEASE_TYPE == 'Major'
3844
uses: trstringer/manual-approval@v1
@@ -93,39 +99,39 @@ jobs:
9399
needs: start
94100
uses: ./.github/workflows/publish-public-operator-docker-image.yaml
95101
with:
96-
release_type: ${{ env.RELEASE_TYPE }}
102+
release_type: ${{ needs.start.outputs.release_type }}
97103
version_number_input: ${{ needs.start.outputs.new_version }}
98-
vulnerability_severity: ${{ env.VULNERABILITY_SEVERITY }}
104+
vulnerability_severity: ${{ needs.start.outputs.vulnerability_severity }}
99105
secrets: inherit
100106

101107
buildGCP:
102108
name: GCP Private Operator
103109
needs: start
104110
uses: ./.github/workflows/publish-gcp-oidc-enclave-docker.yaml
105111
with:
106-
release_type: ${{ env.RELEASE_TYPE }}
112+
release_type: ${{ needs.start.outputs.release_type }}
107113
version_number_input: ${{ needs.start.outputs.new_version }}
108114
commit_sha: ${{ needs.start.outputs.commit_sha }}
109-
vulnerability_severity: ${{ env.VULNERABILITY_SEVERITY }}
115+
vulnerability_severity: ${{ needs.start.outputs.vulnerability_severity }}
110116
secrets: inherit
111117

112118
buildAzure:
113119
name: Azure Private Operator
114120
needs: start
115121
uses: ./.github/workflows/publish-azure-cc-enclave-docker.yaml
116122
with:
117-
release_type: ${{ env.RELEASE_TYPE }}
123+
release_type: ${{ needs.start.outputs.release_type }}
118124
version_number_input: ${{ needs.start.outputs.new_version }}
119125
commit_sha: ${{ needs.start.outputs.commit_sha }}
120-
vulnerability_severity: ${{ env.VULNERABILITY_SEVERITY }}
126+
vulnerability_severity: ${{ needs.start.outputs.vulnerability_severity }}
121127
secrets: inherit
122128

123129
buildAWS:
124130
name: AWS Private Operator EIF
125131
needs: start
126132
uses: ./.github/workflows/publish-aws-nitro-eif.yaml
127133
with:
128-
release_type: ${{ env.RELEASE_TYPE }}
134+
release_type: ${{ needs.start.outputs.release_type }}
129135
version_number_input: ${{ needs.start.outputs.new_version }}
130136
commit_sha: ${{ needs.start.outputs.commit_sha }}
131137
secrets: inherit

0 commit comments

Comments
 (0)