Skip to content

Commit 4d8982e

Browse files
ekarlsoekarlso
and
ekarlso
authored
Use RELEASE_TAG (#50)
* Use RELEASE_TAG * Fix registry setup --------- Co-authored-by: ekarlso <[email protected]>
1 parent c568ab9 commit 4d8982e

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

.github/workflows/release.yaml

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
tags:
66
- "v*"
77
env:
8-
REGISTRY: ghcr.io
9-
IMAGE_NAME: ${{ github.repository }}
8+
REGISTRY: ghcr.io/${{ github.repository }}
109
GO_VERSION: "1.20"
1110

1211
permissions:
@@ -50,7 +49,7 @@ jobs:
5049
uses: docker/metadata-action@v4
5150
with:
5251
github-token: ${{ secrets.GITHUB_TOKEN }}
53-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.target }}
52+
images: ${{ env.REGISTRY }}/${{ matrix.target }}-controller
5453
flavor: latest=false
5554
tags: type=ref,event=tag
5655

@@ -120,15 +119,13 @@ jobs:
120119
with:
121120
github-token: ${{ secrets.GITHUB_TOKEN }}
122121
images: |
123-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-controlplane
124-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-bootstrap
122+
${{ env.REGISTRY }}/controlplane-controller
123+
${{ env.REGISTRY }}/bootstrap-controller
125124
flavor: latest=false
126125
tags: type=ref,event=tag
127126

128127
- name: manifest
129128
run: |
130-
BOOTSTRAP_IMG_TAG=$RELEASE_TAG
131-
CONTROLPLANE_IMG_TAG=$RELEASE_TAG
132129
make release
133130
134131
- name: manifest

Makefile

+9-8
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ TOOLS_BIN_DIR := $(shell pwd)/$(BIN_DIR)
4242
$(TOOLS_BIN_DIR):
4343
mkdir -p $(TOOLS_BIN_DIR)
4444

45-
# Image URL to use all building/pushing image targets
46-
BOOTSTRAP_IMG_TAG ?= v0.2.0
47-
BOOTSTRAP_IMG ?= ghcr.io/cluster-api-provider-k3s/cluster-api-k3s/bootstrap-controller:$(BOOTSTRAP_IMG_TAG)
48-
49-
# Image URL to use all building/pushing image targets
50-
CONTROLPLANE_IMG_TAG ?= v0.2.0
51-
CONTROLPLANE_IMG ?= ghcr.io/cluster-api-provider-k3s/cluster-api-k3s/controlplane-controller:$(CONTROLPLANE_IMG_TAG)
52-
5345

5446
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
5547
CRD_OPTIONS ?= "crd:trivialVersions=true"
@@ -118,6 +110,15 @@ $(RELEASE_DIR):
118110
$(RELEASE_NOTES_DIR):
119111
mkdir -p $(RELEASE_NOTES_DIR)/
120112

113+
REGISTRY ?= ghcr.io/cluster-api-provider-k3s/cluster-api-k3s
114+
115+
# Image URL to use all building/pushing image targets
116+
BOOTSTRAP_IMG_TAG ?= $(RELEASE_TAG)
117+
BOOTSTRAP_IMG ?= $(REGISTRY)/bootstrap-controller:$(BOOTSTRAP_IMG_TAG)
118+
119+
# Image URL to use all building/pushing image targets
120+
CONTROLPLANE_IMG_TAG ?= $(RELEASE_TAG)
121+
CONTROLPLANE_IMG ?= $(REGISTRY)/controlplane-controller:$(CONTROLPLANE_IMG_TAG)
121122

122123
all-bootstrap: manager-bootstrap
123124

0 commit comments

Comments
 (0)