chore: add manifest template and update deploy step to commit rendered manifest

This commit is contained in:
2026-04-14 14:32:30 +10:00
parent 049d417cc8
commit a04aa1b828
2 changed files with 331 additions and 3 deletions
+11 -3
View File
@@ -40,7 +40,7 @@ jobs:
needs: test
if: github.event_name == 'push'
permissions:
contents: read
contents: write
packages: write
steps:
@@ -86,7 +86,15 @@ jobs:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
with:
args: |-
# Update both deployments with new image tags
sed -i 's|image: .*|image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:1.0.${{ github.run_number }}|' k8s/manifest.yaml
# Render template → manifest with the actual image tag
sed 's|__IMAGE_TAG__|1.0.${{ github.run_number }}|g' k8s/manifest.template.yaml > k8s/manifest.yaml
# Apply Kubernetes manifests
kubectl --insecure-skip-tls-verify apply -n ${{ env.K8S_NAMESPACE }} -f k8s/manifest.yaml
- name: Commit updated manifest
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add k8s/manifest.yaml
git commit -m "chore: update manifest image to 1.0.${{ github.run_number }} [skip ci]"
git push