diff --git a/.github/workflows/build-xmtpd.yml b/.github/workflows/build-xmtpd.yml index 2dacb172..845efe91 100644 --- a/.github/workflows/build-xmtpd.yml +++ b/.github/workflows/build-xmtpd.yml @@ -43,13 +43,23 @@ jobs: type=ref,event=tag type=ref,event=pr type=sha - + - name: Set up Docker image file based on the matrix variable + id: set_dockerfile + run: | + if [[ "${{ matrix.image }}" == "xmtpd" ]]; then + echo "dockerfile=Dockerfile" >> $GITHUB_OUTPUT + elif [[ "${{ matrix.image }}" == "xmtpd-cli" ]]; then + echo "dockerfile=Dockerfile-cli" >> $GITHUB_OUTPUT + else + echo "Unknown image: ${{ matrix.image }}" + exit 1 + fi - name: Build and push Docker image uses: docker/build-push-action@v6 id: push with: context: . - file: ./dev/docker/Dockerfile + file: ./dev/docker/${{ steps.set_dockerfile.outputs.dockerfile }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}