diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 0000000..cf100fa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,18 @@ +--- +name: Bug Report +about: Report a bug. +title: "" +labels: "" +assignees: "" +--- + +## Bug Report + +### Description + +### Logs + +### Environment + +- Plugin version: +- Kubernetes version: [`kubectl version --short`] diff --git a/.github/workflows/release-charts.yaml b/.github/workflows/release-charts.yaml new file mode 100644 index 0000000..4166f1c --- /dev/null +++ b/.github/workflows/release-charts.yaml @@ -0,0 +1,41 @@ +name: HelmChart Release + +on: + push: + branches: + - main + paths: + - 'charts/**' + +jobs: + build-publish: + name: "Publish helm chart" + timeout-minutes: 10 + runs-on: ubuntu-22.04 + permissions: + contents: read + packages: write + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install Helm + uses: azure/setup-helm@v3 + - name: Install Cosign + uses: sigstore/cosign-installer@v3.1.1 + + - name: Github registry login + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Helm release + timeout-minutes: 5 + run: make helm-login helm-release + env: + HELM_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index f31f61a..aca693e 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ REGISTRY ?= ghcr.io USERNAME ?= sergelogvinov PROJECT ?= proxmox-cloud-controller-manager IMAGE ?= $(REGISTRY)/$(USERNAME)/$(PROJECT) +HELMREPO ?= $(REGISTRY)/$(USERNAME)/charts PLATFORM ?= linux/arm64,linux/amd64 PUSH ?= false @@ -85,6 +86,19 @@ helm-unit: ## Helm Unit Tests @helm template -f charts/proxmox-cloud-controller-manager/ci/values.yaml \ proxmox-cloud-controller-manager charts/proxmox-cloud-controller-manager >/dev/null +.PHONY: helm-login +helm-login: ## Helm Login + @echo "${HELM_TOKEN}" | helm registry login $(REGISTRY) --username $(USERNAME) --password-stdin + +.PHONY: helm-release +helm-release: ## Helm Release + @rm -rf dist/ + @helm package charts/proxmox-cloud-controller-manager -d dist + @helm push dist/proxmox-cloud-controller-manager-*.tgz oci://$(HELMREPO) 2>&1 | tee dist/.digest + @cosign sign --yes $(COSING_ARGS) $(HELMREPO)/proxmox-cloud-controller-manager@$$(cat dist/.digest | awk -F "[, ]+" '/Digest/{print $$NF}') + +############ + .PHONY: docs docs: helm template -n kube-system proxmox-cloud-controller-manager \