30 lines
759 B
YAML
30 lines
759 B
YAML
name: Build and deploy Docker image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: builder
|
|
env:
|
|
IMAGE: gitea.dsrptlab.com/optovia/teams/teams
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: gitea.dsrptlab.com
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and push
|
|
run: |
|
|
docker build -t "$IMAGE:latest" -t "$IMAGE:${{ gitea.sha }}" .
|
|
docker push "$IMAGE:latest"
|
|
docker push "$IMAGE:${{ gitea.sha }}"
|
|
|
|
- name: Deploy to Dokploy
|
|
run: curl -fsS -X POST "https://ind.dsrptlab.com/api/deploy/2Y2RjGRTm4HIkcO2UmyHL"
|