Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/build_cw_image-prod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: build_CW_docker_image_master
on:
workflow_dispatch:
push:
tags:
- '*'
Expand All @@ -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
Expand All @@ -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}