Compare commits
2 commits
13327bad6f
...
c7274fc8bb
| Author | SHA1 | Date | |
|---|---|---|---|
| c7274fc8bb | |||
| 32e083129b |
1 changed files with 0 additions and 12 deletions
|
|
@ -21,8 +21,6 @@ if [ -z "$GITHUB_SHA" ]; then
|
||||||
echo "GITHUB_SHA not defined, pass it in the environment with an 'env:' clause to the action" && exit 1
|
echo "GITHUB_SHA not defined, pass it in the environment with an 'env:' clause to the action" && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
env
|
|
||||||
|
|
||||||
echo "Going to apply kustomization configuration at ${KUST_CONFIG}"
|
echo "Going to apply kustomization configuration at ${KUST_CONFIG}"
|
||||||
echo "K3S_YAML:"
|
echo "K3S_YAML:"
|
||||||
echo "$K3S_YAML"
|
echo "$K3S_YAML"
|
||||||
|
|
@ -46,15 +44,5 @@ kubectl --kubeconfig /tmp/k3s.yaml kustomize "/tmp/${KUST_CONFIG}" | sed "s/kust
|
||||||
echo "UPDATED YAML:"
|
echo "UPDATED YAML:"
|
||||||
cat /tmp/manifests.yaml
|
cat /tmp/manifests.yaml
|
||||||
echo "applying..."
|
echo "applying..."
|
||||||
|
|
||||||
# if we have FORGEJO_REF_NAME beginning with "v", then set the image to a tag with value FORGEJO_REF_NAME.
|
|
||||||
if [ -n "$FORGEJO_REF_NAME" ] && [[ "$FORGEJO_REF_NAME" == v* ]]; then
|
|
||||||
echo "FORGEJO_REF_NAME starts with v, setting image tag to $FORGEJO_REF_NAME"
|
|
||||||
# sed -i "s|image: myapp:latest|image: myapp:$FORGEJO_REF_NAME|g" /tmp/manifests.yaml
|
|
||||||
kubectl kustomize /tmp/${KUST_CONFIG} edit set image myapp=myapp:$FORGEJO_REF_NAME
|
|
||||||
else
|
|
||||||
echo "FORGEJO_REF_NAME does not start with v, leaving image tag as is"
|
|
||||||
fi
|
|
||||||
|
|
||||||
kubectl --kubeconfig /tmp/k3s.yaml apply -f - </tmp/manifests.yaml
|
kubectl --kubeconfig /tmp/k3s.yaml apply -f - </tmp/manifests.yaml
|
||||||
echo "Done applying kustomized manifests at ${KUST_CONFIG}, success"
|
echo "Done applying kustomized manifests at ${KUST_CONFIG}, success"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue