Skip to content

Commit

Permalink
update github action, fix manual actions, enable docker image tag suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Aug 30, 2024
1 parent 85eaafd commit aac2c42
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci-build-manual-crf.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Build and push a CRF-only docker image

on:
workflow_dispatch:

on:
workflow_dispatch:
inputs:
suffix:
type: string
description: Docker image suffix (e.g. develop, crf, full)
required: false

jobs:
build:
Expand All @@ -26,17 +30,19 @@ jobs:
steps:
- name: Create more disk space
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build and push
id: docker_build
uses: mr-smithers-excellent/docker-build-push@v6
with:
dockerfile: Dockerfile
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
dockerfile: Dockerfile.crf
username: ${{ secrets.DOCKERHUB_USERNAME_LFOPPIANO }}
password: ${{ secrets.DOCKERHUB_TOKEN_LFOPPIANO }}
image: lfoppiano/grobid
registry: docker.io
pushImage: true
tags: latest-develop, latest-crf
tags: |
latest-develop${{ github.event.inputs.suffix && '-' + github.event.inputs.suffix || '' }}
latest-crf${{ github.event.inputs.suffix && '-' + github.event.inputs.suffix || '' }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
2 changes: 1 addition & 1 deletion .github/workflows/ci-build-manual-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- name: Create more disk space
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build and push
id: docker_build
uses: mr-smithers-excellent/docker-build-push@v5
Expand Down

0 comments on commit aac2c42

Please sign in to comment.