From aac2c4235557c705f072bc665616ff98883fb61b Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Tue, 27 Aug 2024 22:01:59 +0200 Subject: [PATCH] update github action, fix manual actions, enable docker image tag suffix --- .github/workflows/ci-build-manual-crf.yml | 22 ++++++++++++++-------- .github/workflows/ci-build-manual-full.yml | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-build-manual-crf.yml b/.github/workflows/ci-build-manual-crf.yml index 619529d63b..84a1c56465 100644 --- a/.github/workflows/ci-build-manual-crf.yml +++ b/.github/workflows/ci-build-manual-crf.yml @@ -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: @@ -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 }} diff --git a/.github/workflows/ci-build-manual-full.yml b/.github/workflows/ci-build-manual-full.yml index 9671177fa8..ce1a0a175b 100644 --- a/.github/workflows/ci-build-manual-full.yml +++ b/.github/workflows/ci-build-manual-full.yml @@ -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