Skip to content

Commit cc27ba9

Browse files
authored
Merge pull request #346 from liquidmetal-dev/fix_image_tag_release
chore: change manifest modification
2 parents eb0227f + 7253a11 commit cc27ba9

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ jobs:
4040
uses: actions/checkout@v4
4141
with:
4242
fetch-depth: 0
43-
- name: Update manifests
43+
- name: Build release manifests
4444
run: |
45-
# this is quite naive, but i don't think we need more for now
46-
sed -i "s/dev/${TAG}/g" config/default/manager_image_patch.yaml
45+
TAG=${{ env.TAG }} make manifest-modification
4746
kustomize build config/default/ > infrastructure-components.yaml
4847
- name: Release
4948
uses: softprops/action-gh-release@v2

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,22 @@ generate-manifests: $(CONTROLLER_GEN)
142142
output:rbac:dir=$(RBAC_ROOT) \
143143
rbac:roleName=manager-role
144144

145+
.PHONY: manifest-modification
146+
manifest-modification: # Set the manifest images to the staging/production bucket.
147+
$(MAKE) set-manifest-image \
148+
MANIFEST_IMG=$(CONTROLLER_IMAGE) MANIFEST_TAG=$(TAG) \
149+
TARGET_RESOURCE="./config/default/manager_image_patch.yaml"
150+
$(MAKE) set-manifest-pull-policy PULL_POLICY=IfNotPresent TARGET_RESOURCE="./config/default/manager_pull_policy.yaml"
151+
152+
.PHONY: set-manifest-pull-policy
153+
set-manifest-pull-policy:
154+
$(info Updating kustomize pull policy file for manager resources)
155+
sed -i'' -e 's@imagePullPolicy: .*@imagePullPolicy: '"$(PULL_POLICY)"'@' $(TARGET_RESOURCE)
156+
157+
.PHONY: set-manifest-image
158+
set-manifest-image:
159+
$(info Updating kustomize image patch file for manager resource)
160+
sed -i'' -e 's@image: .*@image: '"${MANIFEST_IMG}:$(MANIFEST_TAG)"'@' $(TARGET_RESOURCE)
145161

146162
##@ Tools binaries
147163

0 commit comments

Comments
 (0)