Skip to content

Commit 1e4d6a1

Browse files
Remove redundant tag calculation (#2345)
1 parent 9834703 commit 1e4d6a1

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/test-e2e.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,22 @@ jobs:
2727
runs-on: ubuntu-latest
2828
env:
2929
REPOSITORY: ${{ github.repository_owner }}/mongodb-atlas-kubernetes-operator-prerelease
30+
outputs:
31+
tag: ${{ steps.prepare.outputs.tag }}
3032
steps:
3133
- name: Check out code
3234
uses: actions/checkout@v4
3335
with:
3436
ref: ${{github.event.pull_request.head.sha}}
3537
submodules: true
3638
fetch-depth: 0
39+
3740
- name: Prepare tag
3841
id: prepare
3942
uses: ./.github/actions/set-tag
4043
- name: Log in to ghcr.io registry
4144
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
45+
4246
- name: Build and Push image
4347
uses: ./.github/actions/build-push-image
4448
with:
@@ -48,6 +52,7 @@ jobs:
4852
tags: ghcr.io/${{ env.REPOSITORY }}:${{ steps.prepare.outputs.tag }}
4953
platforms: linux/amd64
5054
push_to_docker: false
55+
5156
- name: Do preflight-check on test image
5257
uses: ./.github/actions/certify-openshift-images
5358
with:
@@ -180,9 +185,7 @@ jobs:
180185
uses: jetify-com/[email protected]
181186
with:
182187
enable-cache: 'true'
183-
- name: Prepare tag
184-
id: prepare
185-
uses: ./.github/actions/set-tag
188+
186189
- name: Set properties
187190
id: properties
188191
run: |
@@ -194,8 +197,8 @@ jobs:
194197
- name: Generate configuration for the tests
195198
uses: ./.github/actions/gen-install-scripts
196199
with:
197-
IMAGE_URL: ${{ env.GHCR_REPO }}:${{ steps.prepare.outputs.tag }}
198-
VERSION: ${{ steps.prepare.outputs.tag }}
200+
IMAGE_URL: ${{ env.GHCR_REPO }}:${{ needs.prepare-e2e.outputs.tag }}
201+
VERSION: ${{ needs.prepare-e2e.outputs.tag }}
199202
ENV: dev
200203

201204
- name: Change path for the test
@@ -226,11 +229,11 @@ jobs:
226229
MCLI_PRIVATE_API_KEY: ${{ secrets.ATLAS_PRIVATE_KEY }}
227230
MCLI_ORG_ID: ${{ secrets.ATLAS_ORG_ID}}
228231
MCLI_OPS_MANAGER_URL: "https://cloud-qa.mongodb.com/"
229-
IMAGE_URL: "${{ env.GHCR_REPO }}:${{ steps.prepare.outputs.tag }}"
232+
IMAGE_URL: "${{ env.GHCR_REPO }}:${{ needs.prepare-e2e.outputs.tag }}"
230233
IMAGE_PULL_SECRET_REGISTRY: ghcr.io
231234
IMAGE_PULL_SECRET_USERNAME: $
232235
IMAGE_PULL_SECRET_PASSWORD: "${{ secrets.GITHUB_TOKEN }}"
233-
BUNDLE_IMAGE: "${{ env.GHCR_BUNDLES_REPO}}:${{ steps.prepare.outputs.tag }}"
236+
BUNDLE_IMAGE: "${{ env.GHCR_BUNDLES_REPO}}:${{ needs.prepare-e2e.outputs.tag }}"
234237
K8S_PLATFORM: "${{ steps.properties.outputs.k8s_platform }}"
235238
K8S_VERSION: "${{ steps.properties.outputs.k8s_version }}"
236239
TEST_NAME: "${{ matrix.test }}"

0 commit comments

Comments
 (0)