Skip to content

Commit

Permalink
Tag and Push frontend dashboard image only on Push event
Browse files Browse the repository at this point in the history
Workflow dispatch event is triggered on changes to server image.
This should build the notebook server image as it uses the server image.

But frontend is Javascript nodejs based image and is unrelated to the server.
Check this review comment:
e-mission#125 (comment)
  • Loading branch information
Mahadik, Mukul Chandrakant authored and Mahadik, Mukul Chandrakant committed Aug 14, 2024
1 parent 2a3d635 commit d2a5f69
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/image_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ jobs:
echo "Workflow_dispatch: New server image built and pushed, Updating image tag in .env"
echo "SERVER_IMAGE_TAG=$DOCKER_TAG_FROM_WORKFLOW_DISPATCH" > .env
# else
# echo "Push event: Restoring latest server image tag in .env"
# echo "SERVER_IMAGE_TAG=$DOCKER_TAG_FROM_PUSH" > .env
echo "Push event: Restoring latest server image tag in .env"
# echo "SERVER_IMAGE_TAG=$DOCKER_TAG_FROM_PUSH" > .env
fi
- name: Add, Commit, Push changes to .env file
Expand Down Expand Up @@ -143,12 +143,16 @@ jobs:
- name: rename docker images
run: |
docker image tag em-pub-dash-dev/frontend:latest $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
if [ "${{ github.event_name }}" == "push" ]; then
docker image tag em-pub-dash-dev/frontend:latest $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
fi
docker image tag em-pub-dash-dev/viz-scripts:latest $DOCKER_USER/${GITHUB_REPOSITORY#*/}_notebook:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
- name: push docker images
run: |
docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
if [ "${{ github.event_name }}" == "push" ]; then
docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
fi
docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}_notebook:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
- name: Create a text file
Expand Down

0 comments on commit d2a5f69

Please sign in to comment.