Skip to content

Commit

Permalink
Merge branch 'circle-to-gha'
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Jan 30, 2024
2 parents 4ea387f + b21af1b commit 51b18f1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 134 deletions.
125 changes: 0 additions & 125 deletions .circleci/config.yml

This file was deleted.

32 changes: 25 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
workflow_dispatch: # run manually

env:
DOCKER_TAG: ghcr.io/ocr-d/core
GHCRIO_DOCKER_TAG: ghcr.io/ocr-d/core
DOCKERIO_DOCKER_TAG: docker.io/ocrd/core

jobs:

Expand All @@ -24,22 +25,39 @@ jobs:
uses: docker/setup-buildx-action@v2
- name: Build the Docker image
# default tag uses docker.io, so override on command-line
run: make docker DOCKER_TAG=${{ env.DOCKER_TAG }}
run: make docker DOCKER_TAG=${{ env.GHCRIO_DOCKER_TAG }}
- name: Build the Docker image with GPU support
# default tag uses docker.io, so override on command-line
run: make docker-cuda DOCKER_TAG=${{ env.DOCKER_TAG }}-cuda DOCKER_BASE_IMAGE=${{ env.DOCKER_TAG }}
run: make docker-cuda DOCKER_TAG=${{ env.GHCRIO_DOCKER_TAG }}-cuda DOCKER_BASE_IMAGE=${{ env.GHCRIO_DOCKER_TAG }}
- name: Smoke Test that ocrd --help works
run: |
docker run --rm ${{ env.DOCKER_TAG }} ocrd --version
docker run --rm ${{ env.DOCKER_TAG }}-cuda ocrd --version
docker run --rm ${{ env.GHCRIO_DOCKER_TAG }} ocrd --version
docker run --rm ${{ env.GHCRIO_DOCKER_TAG }}-cuda ocrd --version
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKERIO_USERNAME }}
password: ${{ secrets.DOCKERIO_PASSWORD }}
- name: Push images to Github Container Registry
run: |
docker push ${{ env.DOCKER_TAG }}:latest
docker push ${{ env.DOCKER_TAG }}-cuda:latest
docker push ${{ env.GHCRIO_DOCKER_TAG }}:latest
docker push ${{ env.GHCRIO_DOCKER_TAG }}-cuda:latest
- name: Push images to Docker Hub
run: |
docker tag ${{ env.GHCRIO_DOCKER_TAG }} ${{ env.DOCKERIO_DOCKER_TAG }}
docker tag ${{ env.GHCRIO_DOCKER_TAG }}-cuda ${{ env.DOCKERIO_DOCKER_TAG }}-cuda
docker push ${{ env.DOCKERIO_DOCKER_TAG }}:latest
docker push ${{ env.DOCKERIO_DOCKER_TAG }}-cuda:latest
docker push ${{ env.DOCKERIO_DOCKER_TAG }}:latest
docker push ${{ env.DOCKERIO_DOCKER_TAG }}-cuda:latest
docker tag ${{ env.DOCKERIO_DOCKER_TAG }} ${{ env.DOCKERIO_DOCKER_TAG }}:$(git describe --tags --abbrev=0)
docker tag ${{ env.DOCKERIO_DOCKER_TAG }}-cuda ${{ env.DOCKERIO_DOCKER_TAG }}-cuda:$(git describe --tags --abbrev=0)
docker push ${{ env.DOCKERIO_DOCKER_TAG }}:$(git describe --tags --abbrev=0)
docker push ${{ env.DOCKERIO_DOCKER_TAG }}-cuda:$(git describe --tags --abbrev=0)
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
> Python modules implementing [OCR-D specs](https://github.com/OCR-D/spec) and related tools
[![image](https://img.shields.io/pypi/v/ocrd.svg)](https://pypi.org/project/ocrd/)
[![image](https://circleci.com/gh/OCR-D/core.svg?style=svg)](https://circleci.com/gh/OCR-D/core)
[![Docker Image CI](https://github.com/OCR-D/core/actions/workflows/docker-image.yml/badge.svg)](https://github.com/OCR-D/core/actions/workflows/docker-image.yml)
[![Unit Test CI](https://github.com/OCR-D/core/actions/workflows/unit-test.yml/badge.svg)](https://github.com/OCR-D/core/actions/workflows/unit-test.yml)
[![image](https://scrutinizer-ci.com/g/OCR-D/core/badges/build.png?b=master)](https://scrutinizer-ci.com/g/OCR-D/core)
[![image](https://codecov.io/gh/OCR-D/core/branch/master/graph/badge.svg)](https://codecov.io/gh/OCR-D/core)
[![image](https://scrutinizer-ci.com/g/OCR-D/core/badges/build.png?b=master)](https://scrutinizer-ci.com/g/OCR-D/core)
[![image](https://scrutinizer-ci.com/g/OCR-D/core/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/OCR-D/core)

[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/OCR-D/Lobby)
Expand Down

0 comments on commit 51b18f1

Please sign in to comment.