From 4d8982eca85361c96ba6befc71ab35ad2fa5e1b9 Mon Sep 17 00:00:00 2001 From: Endre Karlson Date: Sun, 10 Sep 2023 19:35:33 +0200 Subject: [PATCH] Use RELEASE_TAG (#50) * Use RELEASE_TAG * Fix registry setup --------- Co-authored-by: ekarlso --- .github/workflows/release.yaml | 11 ++++------- Makefile | 17 +++++++++-------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eebb6bfe..d3558652 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,8 +5,7 @@ on: tags: - "v*" env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + REGISTRY: ghcr.io/${{ github.repository }} GO_VERSION: "1.20" permissions: @@ -50,7 +49,7 @@ jobs: uses: docker/metadata-action@v4 with: github-token: ${{ secrets.GITHUB_TOKEN }} - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.target }} + images: ${{ env.REGISTRY }}/${{ matrix.target }}-controller flavor: latest=false tags: type=ref,event=tag @@ -120,15 +119,13 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} images: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-controlplane - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-bootstrap + ${{ env.REGISTRY }}/controlplane-controller + ${{ env.REGISTRY }}/bootstrap-controller flavor: latest=false tags: type=ref,event=tag - name: manifest run: | - BOOTSTRAP_IMG_TAG=$RELEASE_TAG - CONTROLPLANE_IMG_TAG=$RELEASE_TAG make release - name: manifest diff --git a/Makefile b/Makefile index 075674e3..b35b9edb 100644 --- a/Makefile +++ b/Makefile @@ -42,14 +42,6 @@ TOOLS_BIN_DIR := $(shell pwd)/$(BIN_DIR) $(TOOLS_BIN_DIR): mkdir -p $(TOOLS_BIN_DIR) -# Image URL to use all building/pushing image targets -BOOTSTRAP_IMG_TAG ?= v0.2.0 -BOOTSTRAP_IMG ?= ghcr.io/cluster-api-provider-k3s/cluster-api-k3s/bootstrap-controller:$(BOOTSTRAP_IMG_TAG) - -# Image URL to use all building/pushing image targets -CONTROLPLANE_IMG_TAG ?= v0.2.0 -CONTROLPLANE_IMG ?= ghcr.io/cluster-api-provider-k3s/cluster-api-k3s/controlplane-controller:$(CONTROLPLANE_IMG_TAG) - # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd:trivialVersions=true" @@ -118,6 +110,15 @@ $(RELEASE_DIR): $(RELEASE_NOTES_DIR): mkdir -p $(RELEASE_NOTES_DIR)/ +REGISTRY ?= ghcr.io/cluster-api-provider-k3s/cluster-api-k3s + +# Image URL to use all building/pushing image targets +BOOTSTRAP_IMG_TAG ?= $(RELEASE_TAG) +BOOTSTRAP_IMG ?= $(REGISTRY)/bootstrap-controller:$(BOOTSTRAP_IMG_TAG) + +# Image URL to use all building/pushing image targets +CONTROLPLANE_IMG_TAG ?= $(RELEASE_TAG) +CONTROLPLANE_IMG ?= $(REGISTRY)/controlplane-controller:$(CONTROLPLANE_IMG_TAG) all-bootstrap: manager-bootstrap