📦 v3.12.0 #248
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 CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| workflow_dispatch: # run manually | |
| inputs: | |
| platforms: | |
| description: "platform argument for docker buildx" | |
| type: string | |
| default: "linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le" | |
| env: | |
| #PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le | |
| PLATFORMS: ${{ github.event.inputs.platforms || 'linux/amd64' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| env: | |
| DOCKER_BASE_TAG: ghcr.io/ocr-d docker.io/ocrd | |
| DOCKER_BUILD: docker buildx build --progress=plain --push --platform | |
| steps: | |
| - name: Export variables | |
| run: | | |
| echo "DOCKER_BASE_TAG=${{ env.DOCKER_BASE_TAG }}" >> $GITHUB_ENV | |
| echo "DOCKER_BUILD=${{ env.DOCKER_BUILD }} ${{ env.PLATFORMS }}" >> $GITHUB_ENV | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # we need tags for docker version tagging | |
| fetch-tags: true | |
| fetch-depth: 0 | |
| - # Add support for more CPU platforms | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - # Activate cache export feature to reduce build time of images | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERIO_USERNAME }} | |
| password: ${{ secrets.DOCKERIO_PASSWORD }} | |
| - name: Build the Docker images | |
| run: make docker docker-cuda docker-cuda-tf2 docker-cuda-torch |