File tree Expand file tree Collapse file tree 4 files changed +49
-10
lines changed
Expand file tree Collapse file tree 4 files changed +49
-10
lines changed Original file line number Diff line number Diff line change 9999 subject-digest : ${{ steps.build.outputs.digest }}
100100 subject-name : ghcr.io/${{ github.repository }}
101101 push-to-registry : true
102+
103+ - name : Output image info to summary
104+ if : ${{ inputs.push-image }}
105+ run : |
106+ IMAGE_TAG="${{ inputs.version || github.sha }}"
107+ IMAGE_FULL="ghcr.io/${{ github.repository }}:${IMAGE_TAG}"
108+
109+ echo "## Docker Image" >> $GITHUB_STEP_SUMMARY
110+ echo "" >> $GITHUB_STEP_SUMMARY
111+ echo "Image pushed to registry:" >> $GITHUB_STEP_SUMMARY
112+ echo "" >> $GITHUB_STEP_SUMMARY
113+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
114+ echo "${IMAGE_FULL}" >> $GITHUB_STEP_SUMMARY
115+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
116+ echo "" >> $GITHUB_STEP_SUMMARY
117+ echo "Pull command:" >> $GITHUB_STEP_SUMMARY
118+ echo "" >> $GITHUB_STEP_SUMMARY
119+ echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
120+ echo "docker pull ${IMAGE_FULL}" >> $GITHUB_STEP_SUMMARY
121+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change @@ -29,10 +29,22 @@ jobs:
2929
3030 - name : Run tests
3131 run : make test
32+
33+ build :
34+ uses : ./.github/workflows/docker.yml
35+ with :
36+ push-image : true
37+ secrets :
38+ GH_PAT : ${{ secrets.GH_PAT }}
39+
3240 e2e :
3341 name : E2E Tests
3442 runs-on : ubuntu-latest
35- needs : [test]
43+ needs : [build]
44+ timeout-minutes : 20
45+ permissions :
46+ contents : read
47+ packages : read
3648
3749 steps :
3850 - name : Checkout code
@@ -44,17 +56,23 @@ jobs:
4456 go-version : ${{ env.GO_VERSION }}
4557 gh-token : ${{ secrets.GH_PAT }}
4658
59+ - name : Login to Registry
60+ uses : docker/login-action@v3
61+ with :
62+ registry : ghcr.io
63+ username : ${{ github.repository_owner }}
64+ password : ${{ secrets.GITHUB_TOKEN }}
65+
66+ - name : Pull operator image
67+ run : docker pull ghcr.io/${{ github.repository }}:${{ github.sha }}
68+
4769 - name : Install Kind
4870 uses : helm/kind-action@v1
4971 with :
5072 install_only : true
5173
5274 - name : Run E2E tests
5375 run : make test-e2e
54-
55- build :
56- uses : ./.github/workflows/docker.yml
57- with :
58- push-image : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
59- secrets :
60- GH_PAT : ${{ secrets.GH_PAT }}
76+ env :
77+ E2E_SKIP_BUILD : " true"
78+ E2E_OPERATOR_IMAGE : " ghcr.io/${{ github.repository }}:${{ github.sha }}"
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ test: manifests generate fmt vet envtest ## Run tests.
144144# Run the e2e tests using e2e-framework (auto-creates Kind cluster)
145145.PHONY : test-e2e
146146test-e2e : # # Run e2e tests against a Kind cluster (auto-created)
147- go test ./test/e2e/... -v -timeout 10m
147+ go test ./test/e2e/... -v -timeout 15m
148148
149149.PHONY : lint
150150lint : golangci-lint # # Run golangci-lint linter
Original file line number Diff line number Diff line change 1- # Simplified Dockerfile for e2e testing
1+ # Simplified Dockerfile for local e2e testing
2+ # In CI, the production image from ghcr.io is used instead
23# Assumes binary is pre-built locally for the correct architecture
34FROM gcr.io/distroless/static:nonroot
45WORKDIR /
You can’t perform that action at this time.
0 commit comments