From 2d9631fd7752224e73dc06fe496ce75a4fd16f57 Mon Sep 17 00:00:00 2001 From: Obada Haddad Date: Thu, 23 Jul 2026 14:02:41 +0200 Subject: [PATCH] add manual image creation and date in the tag in case multiple images are created during a release --- .github/workflows/build_cw_image-prod.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_cw_image-prod.yml b/.github/workflows/build_cw_image-prod.yml index 075febb0b..a3e73c068 100644 --- a/.github/workflows/build_cw_image-prod.yml +++ b/.github/workflows/build_cw_image-prod.yml @@ -1,5 +1,6 @@ name: build_CW_docker_image_master on: + workflow_dispatch: push: tags: - '*' @@ -13,7 +14,7 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v5 - - name: Build Image + - name: Build Image with Codabench Version as tag run: docker build -t codalab/codabench-compute-worker:${{ github.ref_name }} -f packaging/container/Containerfile.compute_worker . - name: Login to Docker Hub uses: docker/login-action@v3 @@ -22,7 +23,12 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push image with prod release tag run: docker push codalab/codabench-compute-worker:${{ github.ref_name }} - - name: Change tag to latest + - name: Change tag to latest and push run: | docker tag codalab/codabench-compute-worker:${{ github.ref_name }} codalab/codabench-compute-worker:latest docker push codalab/codabench-compute-worker:latest + - name: Change tag to prod release tag + date for CVEs versioning and push + run: | + NOW=$(date "+%Y-%m-%dT%H-%M-%S") + docker tag codalab/codabench-compute-worker:latest codalab/codabench-compute-worker:${{ github.ref_name }}-${NOW} + docker push codalab/codabench-compute-worker:${{ github.ref_name }}-${NOW} \ No newline at end of file