Skip to content

Commit

Permalink
Merge pull request #55 from mzeevi/ci/add-install-yaml
Browse files Browse the repository at this point in the history
add install.yaml as asset as part of release ci
  • Loading branch information
mzeevi authored May 15, 2024
2 parents 6095e8e + 5e9cf91 commit f655858
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 582 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Build and push image
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
packages: write
steps:
- name: Checkout
Expand All @@ -26,4 +26,12 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
run: make docker-build docker-push IMG=${{ env.REGISTRY }}/${{ env.REPOSITORY_NAME }}:${GITHUB_REF##*/}
run: make docker-build docker-push IMG=${{ env.REGISTRY }}/${{ env.REPOSITORY_NAME }}:${GITHUB_REF##*/}

- name: Create install.yaml file
run: make build/install.yaml IMG=${{ env.REGISTRY }}/${{ env.REPOSITORY_NAME }}:${GITHUB_REF##*/}

- name: Upload install.yaml file
uses: softprops/action-gh-release@v2
with:
files: ./build/install.yaml
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in
undeploy: kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/default | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f -

.PHONY: build/install.yaml
build/install.yaml: manifests kustomize
mkdir -p $(dir $@) && \
rm -rf build/kustomize && \
mkdir -p build/kustomize && \
cd build/kustomize && \
$(KUSTOMIZE) create --resources ../../config/default && \
$(KUSTOMIZE) edit set image controller=${IMG} && \
cd ${CURDIR} && \
$(KUSTOMIZE) build build/kustomize > $@

##@ Dependencies

## Location to install dependencies to
Expand Down
Loading

0 comments on commit f655858

Please sign in to comment.