diff --git a/.drone.yml b/.drone.yml index fce0b0e..7211e83 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,3 +22,19 @@ steps: --destination=192.168.68.11:30500/invest-api:latest --insecure --skip-tls-verify + + - name: update-manifests + image: alpine/git:latest + environment: + GITEA_TOKEN: + from_secret: gitea_token + commands: + - cd /drone/src + - TAG=$(echo $DRONE_COMMIT_SHA | cut -c1-8) + - sed -i "s/newTag:.*/newTag: $TAG/" k8s/base/kustomization.yaml + - git config user.email "drone@colacoder.com" + - git config user.name "Drone CI" + - git add k8s/base/kustomization.yaml + - "git commit -m \"chore: update image tag to $TAG [skip ci]\"" + - git remote set-url origin https://kai:$GITEA_TOKEN@git.colacoder.com/kai/openbb-invest-api.git + - git push origin main diff --git a/k8s/base/kustomization.yaml b/k8s/base/kustomization.yaml index cae7ca4..4ec80f4 100644 --- a/k8s/base/kustomization.yaml +++ b/k8s/base/kustomization.yaml @@ -9,3 +9,7 @@ resources: - deployment.yaml - service.yaml - ingress.yaml + +images: + - name: 192.168.68.11:30500/invest-api + newTag: latest