name: Build and Push Qbitcheck Docker Image on: workflow_dispatch: push: branches: - main paths: - 'Dockerfile' - 'requirements.txt' - 'main.py' - 'api/**' - 'config/**' - 'monitoring/**' - 'persistence/**' - 'utils/**' jobs: build-and-push: runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Log in to Gitea Container Registry uses: docker/login-action@v3 with: registry: gitea.service.dc1.fbleagh.duckdns.org username: ${{ github.actor }} password: ${{ secrets.GITEA_TOKEN || secrets.PACKAGE_TOKEN || secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push multi-arch Docker image uses: docker/build-push-action@v5 with: context: . push: true platforms: linux/amd64,linux/arm64 tags: | gitea.service.dc1.fbleagh.duckdns.org/sstent/qbitcheck:latest gitea.service.dc1.fbleagh.duckdns.org/sstent/qbitcheck:${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max # OCI annotations for repository linking labels: | org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} org.opencontainers.image.title=Qbitcheck Connection Monitor org.opencontainers.image.description=Python application for monitoring qBittorrent connections and managing remediation