--- name: CI/CD on: push: branches: - main jobs: main: 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: main commit_sha: ${{ gitea.sha }} - name: Push run: | docker push oci.reg.darano.ir/gl/app:main docker push oci.reg.darano.ir/gl/app:${{ gitea.sha }} - name: Deploy uses: ./.gitea/actions/deploy-ssh with: ssh_key: ${{ secrets.PROD_SERVER_KEY }} user: ${{ secrets.PROD_SERVER_USER }} host: ${{ secrets.PROD_SERVER_HOST }} compose_file: /services/srv-main/compose.yml compose_project_name: srv-main 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 }}