Files
GL/.gitea/workflows/ci-dev.yaml

50 lines
1.4 KiB
YAML

---
name: CI/CD Dev
on:
push:
branches:
- dev
jobs:
dev:
runs-on: ubuntu-latest
steps:
- name: Checkout Git
uses: https://git.darano.ir/actions/checkout@v5
with:
token: ${{ gitea.token }}
path: ./
submodules: recursive
- name: Login to registry
uses: ./.gitea/actions/docker-login
with:
password: ${{ secrets.REG_PASS }}
- name: Build
uses: ./.gitea/actions/docker-build-push
with:
image: oci.reg.darano.ir/gl/app
branch: dev
commit_sha: ${{ gitea.sha }}
- name: Push
run: |
docker push oci.reg.darano.ir/gl/app:dev
docker push oci.reg.darano.ir/gl/app:${{ gitea.sha }}
- name: Deploy
uses: ./.gitea/actions/deploy-ssh
with:
ssh_key: ${{ secrets.DEV_SERVER_KEY }}
user: ${{ secrets.DEV_SERVER_USER }}
host: ${{ secrets.DEV_SERVER_HOST }}
compose_file: /services/srv-dev/compose.yml
compose_project_name: srv-dev
services: gl
registry_password: ${{ secrets.REG_PASS }}
- name: Notify Telegram
if: always()
uses: ./.gitea/actions/notify-telegram
with:
bot_token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
chat_id: ${{ secrets.TELEGRAM_CHAT_ID }}
status: ${{ job.status }}
repository: ${{ gitea.repository }}
sha: ${{ gitea.sha }}