name: Build and Publish Docker Image on: workflow_dispatch: push: branches: - master jobs: build_and_publish: name: Build and Publish Docker steps: - uses: actions/checkout@v4 - name: Log in to Docker Registry uses: docker/login-action@v3 with: registry: gitea.watsonlabs.net/watsonb8/groupme username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: images: gitea.watsonlabs.net/watsonb8/groupme - name: Build and push Docker image id: push uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}