Files
falah-mobile/.gitea/workflows/build-deploy.yml
T
wmj 8c14ae8f96
Build & Deploy Mobile / build-and-deploy (push) Failing after 59s
ci: add Gitea Actions workflow for build and deploy
2026-07-06 23:50:04 +02:00

35 lines
976 B
YAML

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}