ci/gha: checkout git submodules, too #13
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
name: Docker Image CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "master" ] | |
env: | |
IMAGE_NAME: ghcr.io/ocr-d/tesserocr | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout git submodules too | |
run: git submodule sync && git submodule update --init | |
- # Activate cache export feature to reduce build time of images | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build the Docker image | |
run: make docker DOCKER_TAG=${{ env.IMAGE_NAME }} | |
- name: Push to Github Container Registry | |
run: docker push ${{ env.IMAGE_NAME }} | |