4242 MISE_VERBOSE : 1
4343
4444jobs :
45+ build-e2e-image :
46+ runs-on : ubuntu-latest
47+ needs : [check-docs-only]
48+ if : ${{ needs.check-docs-only.outputs.docs_only != 'true' }}
49+ env :
50+ IMG : kong-operator
51+ TAG : e2e-${{ github.sha }}
52+ steps :
53+ - name : Harden Runner
54+ uses : step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
55+ with :
56+ egress-policy : audit
57+ - name : checkout repository
58+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59+
60+ - name : setup golang
61+ uses : actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
62+ with :
63+ go-version-file : go.mod
64+ cache : false
65+
66+ - name : build docker image
67+ run : make docker.build
68+
69+ - name : save docker image as artifact
70+ run : docker save ${{ env.IMG }}:${{ env.TAG }} -o kong-operator_e2e.tar
71+
72+ - name : upload docker image artifact
73+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
74+ with :
75+ name : kong-operator-e2e-image-${{ github.run_id }}
76+ path : kong-operator_e2e.tar
77+ retention-days : 1
78+ if-no-files-found : error
79+
4580 check-docs-only :
4681 runs-on : ubuntu-latest
4782 outputs :
@@ -352,6 +387,7 @@ jobs:
352387 e2e-tests :
353388 needs :
354389 - check-docs-only
390+ - build-e2e-image
355391 - matrix_k8s_node_versions
356392 if : ${{ needs.check-docs-only.outputs.docs_only != 'true' }}
357393 uses : ./.github/workflows/__e2e_tests.yaml
@@ -360,6 +396,7 @@ jobs:
360396 e2e-tests-chainsaw :
361397 needs :
362398 - check-docs-only
399+ - build-e2e-image
363400 - matrix_k8s_node_versions
364401 if : ${{ needs.check-docs-only.outputs.docs_only != 'true' }}
365402 uses : ./.github/workflows/__e2e_chainsaw_tests.yaml
@@ -420,6 +457,7 @@ jobs:
420457 - samples
421458 - install-with-kustomize
422459 - build
460+ - build-e2e-image
423461 - CRDs
424462 - unit-tests
425463 - envtest-tests
0 commit comments