From 8d36fa0a6a686683c3e6a8aa08642ca51985d49a Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Fri, 20 Sep 2024 09:51:09 -0400 Subject: [PATCH] make CI autodeploy Signed-off-by: Xe Iaso --- .gitea/workflows/earthly.yml | 11 ++++++++++- manifest/ci.yaml | 4 ++++ manifest/kustomization.yaml | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 manifest/ci.yaml diff --git a/.gitea/workflows/earthly.yml b/.gitea/workflows/earthly.yml index 3f5efc3..1646efb 100644 --- a/.gitea/workflows/earthly.yml +++ b/.gitea/workflows/earthly.yml @@ -45,4 +45,13 @@ jobs: docker info env - name: build www image - run: earthly +run \ No newline at end of file + run: earthly --push +run + - uses: actions-hub/kubectl@master + env: + KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} + KUBE_CONTEXT: ${{ secrets.KUBE_CONTEXT }} + with: + args: apply -k manifest + - uses: actions-hub/kubectl@master + with: + args: rollout restart -n default deployment/techaro-lol \ No newline at end of file diff --git a/manifest/ci.yaml b/manifest/ci.yaml new file mode 100644 index 0000000..0a3b86e --- /dev/null +++ b/manifest/ci.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: techaro-ci \ No newline at end of file diff --git a/manifest/kustomization.yaml b/manifest/kustomization.yaml index 698831c..6a30666 100644 --- a/manifest/kustomization.yaml +++ b/manifest/kustomization.yaml @@ -1,4 +1,5 @@ resources: + - ci.yaml - deployment.yaml - ingress.yaml - secret.yaml