name: Build and Push Docker Image on: push: branches: - main workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Docker login to Gitea Registry run: | echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "${{ vars.REGISTRY_URL }}" \ -u "${{ secrets.REGISTRY_USER }}" \ --password-stdin - name: Build Docker image run: | docker build \ -t "${{ vars.REGISTRY_URL }}/${{ vars.IMAGE_NAME }}:latest" \ -t "${{ vars.REGISTRY_URL }}/${{ vars.IMAGE_NAME }}:${{ gitea.sha }}" \ . - name: Push Docker image run: | docker push "${{ vars.REGISTRY_URL }}/${{ vars.IMAGE_NAME }}:latest" docker push "${{ vars.REGISTRY_URL }}/${{ vars.IMAGE_NAME }}:${{ gitea.sha }}" - name: Deploy run: | curl https://dokploy.robosoft-solutions.de/api/deploy/compose/vETS7jxOixux3wDPobAaL