Files
orders/.gitea/workflows/build.yaml
T
Ruslan Bakiev 10cc93104a
Build and deploy Docker image / build (push) Successful in 2m2s
ci: deploy through Earth Dokploy
2026-08-19 18:24:44 +07:00

34 lines
844 B
YAML

name: Build and deploy Docker image
on:
workflow_dispatch:
push:
branches: [main]
jobs:
build:
runs-on: builder
env:
IMAGE: gitea.dsrptlab.com/optovia/orders/orders
steps:
- uses: actions/checkout@v4
- name: Build and publish
run: |
set -euo pipefail
docker build -t "$IMAGE:latest" -t "$IMAGE:${{ gitea.sha }}" .
docker push "$IMAGE:latest"
docker push "$IMAGE:${{ gitea.sha }}"
- name: Remove local image tags
run: docker image rm -f "$IMAGE:latest" "$IMAGE:${{ gitea.sha }}"
- name: Deploy in Dokploy
env:
DOKPLOY_DEPLOY_WEBHOOK: ${{ secrets.DOKPLOY_DEPLOY_WEBHOOK }}
run: |
set -euo pipefail
test -n "$DOKPLOY_DEPLOY_WEBHOOK"
curl -fsS -X POST "$DOKPLOY_DEPLOY_WEBHOOK"