Merge pull request #15 from Elembio/review_round_20260328 #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Docker image" | |
| on: | |
| pull_request: | |
| paths: | |
| # Step takes 30 min, too long for PR commits, so leaving it only to significant changes | |
| # - "pyproject.toml" | |
| - "Dockerfile" | |
| push: | |
| # Build multiqc:dev on every push to main | |
| branches: [main] | |
| paths-ignore: | |
| - "docs/**" | |
| - "*.md" | |
| release: | |
| # Build release | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| if: github.repository == 'MultiQC/MultiQC' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| v: | |
| - lab: "" | |
| build_args: "" | |
| - lab: "pdf-" | |
| build_args: "INSTALL_PANDOC=true" | |
| steps: | |
| - name: "Check out the repo" | |
| uses: actions/checkout@v4 | |
| # https://github.com/docker/setup-qemu-action | |
| - name: "Set up QEMU" | |
| uses: docker/setup-qemu-action@v2 | |
| # https://github.com/docker/setup-buildx-action | |
| - name: "Set up Docker Buildx" | |
| id: buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: "Log in to Docker Hub" | |
| uses: docker/login-action@v2 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: "Login to GitHub Container Registry" | |
| uses: docker/login-action@v2 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: "Build dev" | |
| uses: docker/build-push-action@v3 | |
| if: github.event_name != 'release' | |
| with: | |
| # All available with python:3.X-slim are: | |
| # platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x | |
| # But 32-bit binaries likely require compilation from source so stick with linux/amd64 and linux/arm64 for now | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: ${{ matrix.v.build_args }} | |
| # Only push if it's commit to main, or workflow_dispatch | |
| push: ${{github.event_name != 'pull_request'}} | |
| tags: | | |
| multiqc/multiqc:${{matrix.v.lab}}dev | |
| ghcr.io/multiqc/multiqc:${{matrix.v.lab}}dev | |
| - name: "Build release" | |
| uses: docker/build-push-action@v3 | |
| if: github.event_name == 'release' | |
| with: | |
| # All available with python:3.X-slim are: | |
| # platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x | |
| # But 32-bit binaries likely require compilation from source so stick with linux/amd64 and linux/arm64 for now | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: ${{ matrix.v.build_args }} | |
| push: true | |
| tags: | | |
| multiqc/multiqc:${{ matrix.v.lab }}${{ github.event.release.tag_name }} | |
| multiqc/multiqc:${{ matrix.v.lab }}latest | |
| ghcr.io/multiqc/multiqc:${{ matrix.v.lab }}${{ github.event.release.tag_name }} | |
| ghcr.io/multiqc/multiqc:${{ matrix.v.lab }}latest |