diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 6eab5c6..1f8d8bb 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -19,14 +19,6 @@ jobs: git config --global http.https://git.kimchi.sslVerify false git clone --depth 1 https://${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}@git.kimchi/tas/major_tom.git . - - name: Debug registry auth - run: | - curl -s -D- http://git.kimchi/v2/ | head -15 - TOKEN=$(curl -s "http://git.kimchi/v2/token?service=container_registry&scope=repository:tas/major_tom:push,pull" -u "${{ - secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}" | jq -r .token) - echo "Token received: ${TOKEN:0:20}..." - curl -s -D- -H "Authorization: Bearer $TOKEN" http://git.kimchi/v2/tas/major_tom/tags/list | head -15 - - name: Build and push container image run: | set -ex @@ -49,9 +41,10 @@ jobs: - name: Restart deployment on k3s run: | mkdir -p ~/.kube - echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config + echo "${{ secrets.KUBECONFIG }}" | base64 -d > ~/.kube/config chmod 600 ~/.kube/config + kubectl delete pod -l app=${{ env.DEPLOYMENT }} -n ${{ env.NAMESPACE }} POD_NAME=$(kubectl get pods -l app=jnr-web -n jnr-web -o jsonpath='{.items[0].metadata.name}') echo "Deleting running pod" "$POD_NAME" - kubectl delete pod $POD_NAME -n jnr-web \ No newline at end of file + \ No newline at end of file