Skip to content

Commit

Permalink
change image generation policy
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneliu0019 authored and Rader committed Nov 27, 2024
1 parent 63b481c commit b202a67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
- name: Set Docker image tag
id: tag
run: |
if [ "${{ github.event_name }}" == "schedule" ]; then
if [ "${{ github.event_name }}" == "schedule" ] && [ "${{ github.ref }}" == "refs/heads/main" ]; then
echo "TAGS=opencsg/csghub-server:latest,${{ secrets.ACR_REGISTRY }}/opencsg_public/csghub_server:latest" >> $GITHUB_ENV
else
echo "TAGS=opencsg/csghub-server:latest,opencsg/csghub-server:${GITHUB_REF_NAME},${{ secrets.ACR_REGISTRY }}/opencsg_public/csghub_server:latest,${{ secrets.ACR_REGISTRY }}/opencsg_public/csghub_server:${GITHUB_REF_NAME}" >> $GITHUB_ENV
elif [ "${{ github.event_name }}" == "push" ]; then
echo "TAGS=opencsg/csghub-server:${GITHUB_REF_NAME},${{ secrets.ACR_REGISTRY }}/opencsg_public/csghub_server:${GITHUB_REF_NAME}" >> $GITHUB_ENV
fi
- name: Build and push Docker image
Expand Down

0 comments on commit b202a67

Please sign in to comment.