Skip to content

Commit

Permalink
try new GH Action for GHCR Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Mar 14, 2023
1 parent 46a53ab commit 276ab39
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker-image.yml
@@ -0,0 +1,38 @@
name: Docker Image CI

on:
push:
branches: [ "master" ]
workflow_dispatch: # run manually

jobs:

build:

runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v3
- # Activate cache export feature to reduce build time of images
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build the Docker image
run: make docker DOCKER_TAG=ghcr.io/ocrd/core
- name: Build the Docker image with GPU support
run: make docker-cuda DOCKER_TAG=ghcr.io/ocrd/core-cuda
#- name: Authenticate with ghcr.io
# run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push images to Github Container Registry
run: |
docker push ghcr.io/ocrd/core:latest
docker push ghcr.io/ocrd/core-cuda:latest

0 comments on commit 276ab39

Please sign in to comment.