This repository has been archived on 2026-07-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
shira-hermes/.gitea/workflows/deploy.yaml
T
chaim ebe4d100d5 ci: trigger prod redeploy from CI/CD
shira-hermes prod migrated to dockerimage (uuid r4xw6upm3237c63ohbye12g7,
replaces the old Dockerfile-built xqfd89...). The new app pulls
gitea.dev.marcus-law.co.il/espocrm-extensions/shira-hermes:latest, so it
needs a redeploy when CI/CD pushes a new :latest. Adding a second
"Trigger Coolify redeploy (prod)" step that calls prod Coolify with
COOLIFY_PROD_TOKEN + COOLIFY_PROD_UUID secrets (just added to repo).

Now one push to main → image build → both dev and prod auto-update.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 22:00:41 +00:00

62 lines
1.8 KiB
YAML

name: Build & Deploy
on:
push:
branches: [main]
tags: ["v*"]
env:
REGISTRY: gitea.dev.marcus-law.co.il
IMAGE: espocrm-extensions/shira-hermes
COOLIFY_UUID: yfunusjvicdvncelvjszuupk
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Gitea Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | \
docker login ${{ env.REGISTRY }} \
-u "${{ secrets.REGISTRY_USER }}" --password-stdin
- name: Build and tag image
run: |
BASE="${{ env.REGISTRY }}/${{ env.IMAGE }}"
TAGS="-t ${BASE}:latest -t ${BASE}:build-${{ github.run_number }}"
REF="${{ github.ref }}"
if [[ "$REF" == refs/tags/v* ]]; then
VERSION="${REF#refs/tags/}"
TAGS="$TAGS -t ${BASE}:${VERSION}"
fi
docker build $TAGS .
- name: Push image
run: |
BASE="${{ env.REGISTRY }}/${{ env.IMAGE }}"
docker push "${BASE}:latest"
docker push "${BASE}:build-${{ github.run_number }}"
REF="${{ github.ref }}"
if [[ "$REF" == refs/tags/v* ]]; then
VERSION="${REF#refs/tags/}"
docker push "${BASE}:${VERSION}"
fi
- name: Trigger Coolify redeploy (dev)
run: |
curl -sf \
"http://coolify:8080/api/v1/deploy?uuid=${{ env.COOLIFY_UUID }}&force=true" \
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}"
- name: Trigger Coolify redeploy (prod)
run: |
curl -sf \
"https://coolify.prod.marcus-law.co.il/api/v1/deploy?uuid=${{ secrets.COOLIFY_PROD_UUID }}&force=true" \
-H "Authorization: Bearer ${{ secrets.COOLIFY_PROD_TOKEN }}"