From 3bec67ae49bf3a0d5ca5ea9da86683bc273c1124 Mon Sep 17 00:00:00 2001 From: Ola Date: Fri, 22 May 2026 21:15:15 +0200 Subject: [PATCH] ci: add gitea actions deploy workflow --- .gitea/workflows/deploy.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..c5d214a --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Build and deploy + +on: + push: + branches: [main] + workflow_dispatch: + +env: + IMAGE: gitea.mystmec.com/ola/boka-gasol247 + +jobs: + build-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Login to Gitea Container Registry + run: | + echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login gitea.mystmec.com \ + -u "${{ secrets.REGISTRY_USER }}" --password-stdin + + - name: Build image + run: | + docker build \ + -t "$IMAGE:latest" \ + -t "$IMAGE:${{ github.sha }}" \ + . + + - name: Push image + run: | + docker push "$IMAGE:latest" + docker push "$IMAGE:${{ github.sha }}" + + - name: Deploy + run: | + cd /host-stacks/gas-mystmec + docker compose pull + docker compose up -d