Revert "ci: deploy via rollout restart instead of git-commit image bumps"

This reverts commit f093b1bb4b.
This commit is contained in:
Graham McIntire 2026-04-28 14:24:53 -05:00
parent f093b1bb4b
commit 0625438700
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59
2 changed files with 18 additions and 15 deletions

View file

@ -45,17 +45,20 @@ jobs:
docker push "${IMAGE}:${TAG}"
docker push "${IMAGE}:main"
- name: Install kubectl
- name: Update deployment manifest
run: |
curl -sLO "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
install -m 0755 kubectl /usr/local/bin/kubectl
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
TAG="${{ steps.tag.outputs.tag }}"
sed -i "s|image: ${IMAGE}:.*|image: ${IMAGE}:${TAG}|g" k8s/deployment.yaml
- name: Trigger rollout (no git commit)
env:
KUBECONFIG_DATA: ${{ secrets.KUBECONFIG_DATA }}
- name: Commit and push updated manifest
run: |
mkdir -p "$HOME/.kube"
printf '%s' "$KUBECONFIG_DATA" | base64 -d > "$HOME/.kube/config"
chmod 600 "$HOME/.kube/config"
kubectl -n aprs rollout restart deployment/aprs
kubectl -n aprs rollout status deployment/aprs --timeout=5m
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
TAG="${{ steps.tag.outputs.tag }}"
git config user.name "FluxCD"
git config user.email "fluxcd@w5isp.com"
git remote set-url origin https://x-token:${{ github.token }}@git.mcintire.me/graham/aprs.me.git
git add k8s/deployment.yaml
git diff --cached --quiet && echo "No changes to commit" && exit 0
git commit -m "chore: update aprs.me image to ${IMAGE}:${TAG} [skip ci]"
git push origin main

View file

@ -31,8 +31,8 @@ spec:
type: RuntimeDefault
initContainers:
- name: migrate
image: git.mcintire.me/graham/aprs.me:main
imagePullPolicy: Always
image: git.mcintire.me/graham/aprs.me:main-1777403979-3f2e025
imagePullPolicy: IfNotPresent
command: ["/app/bin/migrate"]
securityContext:
allowPrivilegeEscalation: false
@ -82,8 +82,8 @@ spec:
cpu: "500m"
containers:
- name: aprs
image: git.mcintire.me/graham/aprs.me:main
imagePullPolicy: Always
image: git.mcintire.me/graham/aprs.me:main-1777403979-3f2e025
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true