From 3eb89a5665abaa615111e611a71fb2384fa8fd63 Mon Sep 17 00:00:00 2001 From: FalahMobile Date: Tue, 7 Jul 2026 05:49:41 +0800 Subject: [PATCH] fix update runner label --- .gitea/workflows/build-deploy.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/build-deploy.yml diff --git a/.gitea/workflows/build-deploy.yml b/.gitea/workflows/build-deploy.yml new file mode 100644 index 0000000..f97f8e8 --- /dev/null +++ b/.gitea/workflows/build-deploy.yml @@ -0,0 +1,34 @@ +name: Build & Deploy Mobile +on: + push: + branches: + - staging + +env: + REGISTRY: ghcr.io + IMAGE_NAME: maifors/falah-mobile + SWARM_SERVICE: falah_falah-mobile + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Log in to Container Registry + run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin + + - name: Build and Push Docker Image + run: | + IMAGE_TAG="${REGISTRY}/${IMAGE_NAME}:staging-${GITHUB_SHA::7}" + docker build -t ${IMAGE_TAG} -t ${REGISTRY}/${IMAGE_NAME}:staging . + docker push ${IMAGE_TAG} + docker push ${REGISTRY}/${IMAGE_NAME}:staging + + - name: Deploy to Swarm + run: | + docker service update \ + --image ${REGISTRY}/${IMAGE_NAME}:staging \ + --with-registry-auth \ + ${SWARM_SERVICE}