File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,4 +114,4 @@ jobs:
114114 git push origin "$NEW_TAG"
115115
116116 echo "Successfully created and pushed tag $NEW_TAG"
117- done
117+ done
Original file line number Diff line number Diff line change 6464 push : true
6565 tags : |
6666 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main
67- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version_tag }}
67+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version_tag }}
Original file line number Diff line number Diff line change @@ -94,10 +94,25 @@ jobs:
9494 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.major_minor }}
9595 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.major }}
9696
97+ - name : Set up Go
98+ uses : actions/setup-go@v5
99+ with :
100+ go-version-file : ' go.mod'
101+
102+ - name : Generate installation manifest
103+ run : |
104+ GIT_SHA=$(git rev-parse --short HEAD)
105+ make build-installer \
106+ IMG=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.full }} \
107+ VERSION_LABEL=${{ steps.version.outputs.full }} \
108+ GIT_SHA_LABEL=${GIT_SHA}
109+ mv dist/install.yaml func-operator.yaml
110+
97111 - name : Create GitHub Release
98112 env :
99113 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
100114 run : |
101115 gh release create ${{ github.ref_name }} \
102116 --title "Release ${{ github.ref_name }}" \
103- --generate-notes
117+ --generate-notes \
118+ func-operator.yaml
Original file line number Diff line number Diff line change @@ -209,7 +209,16 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
209209build-installer : manifests generate kustomize # # Generate a consolidated YAML with CRDs and deployment.
210210 mkdir -p dist
211211 cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMG}
212+ @if [ -n " $( VERSION_LABEL) " ]; then \
213+ cd config/default && $(KUSTOMIZE ) edit add label app.kubernetes.io/version:$(VERSION_LABEL ) --force; \
214+ fi
215+ @if [ -n " $( GIT_SHA_LABEL) " ]; then \
216+ cd config/default && $(KUSTOMIZE ) edit add label app.kubernetes.io/commit:$(GIT_SHA_LABEL ) --force; \
217+ fi
212218 $(KUSTOMIZE ) build config/default > dist/install.yaml
219+ @if [ -n " $( VERSION_LABEL) " ] || [ -n " $( GIT_SHA_LABEL) " ]; then \
220+ cd config/default && git restore kustomization.yaml; \
221+ fi
213222
214223# #@ Deployment
215224
You can’t perform that action at this time.
0 commit comments