-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from OCR-D/docker-build-args
build docker w/ labels, add continuous deployment
- Loading branch information
Showing
3 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Docker Image CD | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- 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 | ||
- 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 ocrd/im6convert | ||
- name: Alias the Docker image for GHCR | ||
run: docker tag ocrd/im6convert ghcr.io/${{ github.repository }} | ||
- 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/${{ github.repository }} |
This file contains 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
This file contains 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