7272 sudo apt clean
7373 docker rmi $(docker image ls -aq) &> /dev/null || true
7474 df -h
75+
7576 - name : Compute release tag and options
7677 id : tag
7778 run : |
@@ -94,22 +95,40 @@ jobs:
9495 echo "version=${version}" >> "$GITHUB_OUTPUT"
9596 echo "certified_version=${version}-certified" >> "$GITHUB_OUTPUT"
9697 cat "$GITHUB_OUTPUT"
98+
9799 - name : Check out code
98100 uses : actions/checkout@v4
99101 with :
100102 submodules : true
101103 fetch-depth : 0
102104 ref : ${{ env.TAG }}
105+
103106 - name : Install devbox
104107 uses :
jetify-com/[email protected] 105108 with :
106109 enable-cache : ' true'
110+
111+ - name : Generate GitHub App Token
112+ id : generate_token
113+ uses : actions/create-github-app-token@v2
114+ with :
115+ app-id : ${{ secrets.AKO_RELEASER_APP_ID }}
116+ private-key : ${{ secrets.AKO_RELEASER_RSA_KEY }}
117+ owner : ${{ github.repository_owner }}
118+ repositories : |
119+ mongodb-atlas-kubernetes
120+ helm-charts
121+
107122 - name : Trigger helm post release workflow
123+ env :
124+ GH_TOKEN : ${{ steps.generate_token.outputs.token }}
108125 if : ${{ steps.tag.outputs.release_helm == 'true' }}
109126 run : |
110- devbox run -- 'make release-helm JWT_RSA_PEM_KEY_BASE64="${{ secrets.AKO_RELEASER_RSA_KEY_BASE64 }}" \
111- JWT_APP_ID="${{ secrets.AKO_RELEASER_APP_ID }}" \
112- VERSION="${{ steps.tag.outputs.version }}"'
127+ gh workflow run post-atlas-operator-release.yaml \
128+ --repo mongodb/helm-charts \
129+ --ref main \
130+ --fields version="${{ steps.tag.outputs.version }}" \
131+
113132 - name : Choose Dockerfile
114133 id : pick-dockerfile
115134 run : |
@@ -118,6 +137,7 @@ jobs:
118137 else
119138 echo "dockerfile=Dockerfile" >> $GITHUB_OUTPUT
120139 fi
140+
121141 - name : Check signing supported
122142 id : check-signing-support
123143 run : |
@@ -126,6 +146,7 @@ jobs:
126146 else
127147 echo "sign=false" >> $GITHUB_OUTPUT
128148 fi
149+
129150 - name : Build all platforms & check version
130151 if : steps.pick-dockerfile.outputs.dockerfile == 'fast.Dockerfile'
131152 run : |
@@ -137,6 +158,7 @@ jobs:
137158 else
138159 echo "Skipped version check"
139160 fi'
161+
140162 - name : Build and Push image
141163 uses : ./.github/actions/build-push-image
142164 with :
@@ -154,6 +176,7 @@ jobs:
154176 ${{ steps.tag.outputs.repo }}:${{ steps.tag.outputs.version }}
155177 quay.io/${{ steps.tag.outputs.repo }}:${{ steps.tag.outputs.version }}
156178 quay.io/${{ steps.tag.outputs.repo }}:${{ steps.tag.outputs.version }}-certified
179+
157180 - name : Certify Openshift images
158181 if : ${{ steps.tag.outputs.certify == 'true' }}
159182 uses : ./.github/actions/certify-openshift-images
@@ -165,13 +188,15 @@ jobs:
165188 rhcc_token : ${{ secrets.RH_CERTIFICATION_PYXIS_API_TOKEN }}
166189 rhcc_project : ${{ secrets.RH_CERTIFICATION_OSPID }}
167190 submit : true
191+
168192 - name : Login to artifactory.corp.mongodb.com
169193 if : steps.check-signing-support.outputs.sign == 'true'
170194 uses : docker/login-action@v3
171195 with :
172196 registry : artifactory.corp.mongodb.com
173197 username : ${{ secrets.MDB_ARTIFACTORY_USERNAME }}
174198 password : ${{ secrets.MDB_ARTIFACTORY_PASSWORD }}
199+
175200 - name : Sign images
176201 if : steps.check-signing-support.outputs.sign == 'true'
177202 env :
@@ -185,6 +210,7 @@ jobs:
185210 devbox run -- 'make sign IMG="quay.io/${{ env.IMAGE_REPOSITORY }}:${{ steps.tag.outputs.version }}-certified" SIGNATURE_REPO=${{ env.IMAGE_REPOSITORY }}'
186211 devbox run -- 'make sign IMG="${{ env.IMAGE_REPOSITORY }}:${{ steps.tag.outputs.version }}" SIGNATURE_REPO=mongodb/signatures'
187212 devbox run -- 'make sign IMG="quay.io/${{ env.IMAGE_REPOSITORY }}:${{ steps.tag.outputs.version }}-certified" SIGNATURE_REPO=mongodb/signatures'
213+
188214 - name : Self-verify images
189215 if : steps.check-signing-support.outputs.sign == 'true'
190216 env :
@@ -198,10 +224,12 @@ jobs:
198224 devbox run -- 'make verify IMG="quay.io/${{ env.IMAGE_REPOSITORY }}:${{ steps.tag.outputs.version }}-certified" SIGNATURE_REPO=${{ env.IMAGE_REPOSITORY }}'
199225 devbox run -- 'make verify IMG="${{ env.IMAGE_REPOSITORY }}:${{ steps.tag.outputs.version }}" SIGNATURE_REPO=mongodb/signatures'
200226 devbox run -- 'make verify IMG="quay.io/${{ env.IMAGE_REPOSITORY }}:${{ steps.tag.outputs.version }}-certified" SIGNATURE_REPO=mongodb/signatures'
227+
201228 - name : Create configuration package
202229 run : |
203230 devbox run -- 'set -x'
204231 devbox run -- 'tar czvf atlas-operator-all-in-one-${{ steps.tag.outputs.version }}.tar.gz -C deploy all-in-one.yaml'
232+
205233 - name : Create Release
206234 if : steps.tag.outputs.release_to_github == 'true'
207235 id : create_release
@@ -214,6 +242,7 @@ jobs:
214242 body_path : docs/release-notes/release-notes-template.md
215243 draft : true
216244 prerelease : false
245+
217246 - name : Upload Release Asset
218247 if : steps.tag.outputs.release_to_github == 'true'
219248 id : upload-release-asset
0 commit comments