diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e89fb1c..363290d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -119,21 +119,23 @@ jobs: KUBECONFIG="${KUBECONFIG_PATH}" kubectl cluster-info --request-timeout=15s - - name: Set up kustomize - env: - KUSTOMIZE_VERSION: v5.7.1 - run: | - mkdir -p "${RUNNER_TEMP}/bin" - curl -fsSL "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" \ - | tar -xz -C "${RUNNER_TEMP}/bin" kustomize - echo "${RUNNER_TEMP}/bin" >> "${GITHUB_PATH}" - + # Overlay that pins the image to this commit, using kubectl's built-in kustomize. - name: Pin image to this commit - working-directory: k8s - run: kustomize edit set image "jesseinit-portfolio=${REGISTRY}/${IMAGE_NAME}:sha-${GITHUB_SHA}" + run: | + mkdir -p k8s-deploy + cat > k8s-deploy/kustomization.yaml < with `kustomize edit set image` before applying. +# CI pins the tag to sha- via a generated overlay (see deploy.yml). images: - name: jesseinit-portfolio newName: tea.jesseinit.dev/jesseinit/personal-site