All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 7s
Job containers were on isolated network, couldn't reach Coolify API. Now runner config sets container.network=coolify and curl targets http://coolify:8080 (internal container name). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
37 lines
1010 B
YAML
37 lines
1010 B
YAML
name: Build & Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
env:
|
|
REGISTRY: gitea.nautilus.marcusgroup.org
|
|
IMAGE: ezer-mishpati/legal-ai
|
|
|
|
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 push image
|
|
run: |
|
|
TAG="${{ env.REGISTRY }}/${{ env.IMAGE }}:latest"
|
|
SHA_TAG="${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }}"
|
|
docker build -t "$TAG" -t "$SHA_TAG" .
|
|
docker push "$TAG"
|
|
docker push "$SHA_TAG"
|
|
|
|
- name: Trigger Coolify redeploy
|
|
run: |
|
|
curl -sf \
|
|
"http://coolify:8080/api/v1/deploy?uuid=my85gabx37ele9aouub8t8ju&force=true" \
|
|
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}"
|