Skip to content

Commit

Permalink
move last remaining functionalit from circle to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Jan 24, 2024
1 parent e9c20e0 commit e5ce591
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/ocr-d/core

jobs:

Expand All @@ -24,14 +25,14 @@ 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.GH_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:
Expand All @@ -40,6 +41,23 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- 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: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push images to Docker Hub
run: |
docker tag ${{ GHCRIO_DOCKER_TAG }} ${{ DOCKERIO__DOCKER_TAG }}
docker tag ${{ GHCRIO_DOCKER_TAG }}-cuda ${{ 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 e5ce591

Please sign in to comment.