name: Build and Push Docker Image on: push: branches: - main workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log in to Gitea Container Registry uses: docker/login-action@v3 with: registry: git.pihkaal.me username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} - name: Build and push Docker image uses: docker/build-push-action@v6 with: context: . push: true tags: git.pihkaal.me/pihkaal/pihka-al:latest cache-from: type=registry,ref=git.pihkaal.me/pihkaal/pihka-al:cache cache-to: type=registry,ref=git.pihkaal.me/pihkaal/pihka-al:cache,mode=max