Skip to content

Commit

Permalink
use fixed repository name as GHA will replace any refs by *** anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Mar 25, 2023
1 parent ed1237e commit 1391524
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,26 @@ jobs:
contents: read

steps:
- name: Replace underscores in tag name
run: NAME="$GITHUB.REPOSITORY"; echo DOCKER_TAG=${NAME//_//} >> $GITHUB_ENV
- uses: actions/checkout@v3
- # Activate cache export feature to reduce build time of image
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build the Docker image
run: make docker DOCKER_TAG=${{ env.DOCKER_TAG }}
run: make docker
- name: Login to Dockerhub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Push image to Dockerhub
run: docker push ${{ env.DOCKER_TAG }}
run: docker push bertsky/ocrd/detectron2
- name: Alias the Docker image for GHCR
run: docker tag ${{ env.DOCKER_TAG }} ghcr.io/${{ env.DOCKER_TAG }}
run: docker tag bertsky/ocrd/detectron2 ghcr.io/bertsky/ocrd/detectron2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image to Github Container Registry
run: docker push ghcr.io/${{ env.DOCKER_TAG }}
run: docker push ghcr.io/bertsky/ocrd/detectron2
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PYTHONIOENCODING=utf8
SHELL = /bin/bash

# Docker container tag
DOCKER_TAG = 'bertsky/detectron2'
DOCKER_TAG = 'bertsky/ocrd/detectron2'

help:
@echo
Expand Down

0 comments on commit 1391524

Please sign in to comment.