diff --git a/.env b/.env new file mode 100644 index 0000000..090d194 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +PUBLIC_DASH_NOTEBOOK_IMAGE_TAG=2024-09-20--38-59 +PUBLIC_DASH_FRONTEND_IMAGE_TAG=2024-09-20--29-15 +SERVER_IMAGE_TAG=2024-09-20--58-50 diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index 45c1aad..61f48e5 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -24,7 +24,7 @@ jobs: -H "Authorization: Bearer ${{ secrets.GH_FG_PAT_TAGS }}" \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/MukuFlash03/e-mission-server/contents/.env.tags?ref=cleanup-cicd) + https://api.github.com/repos/MukuFlash03/e-mission-server/contents/.env?ref=cleanup-cicd) content=$(echo "$response" | jq -r .content) decoded_content=$(echo "$content" | base64 --decode) @@ -34,7 +34,7 @@ jobs: - name: Set docker image tags id: set-tags run: | - set -a; source .env.tags; set +a + set -a; source .env; set +a echo "PUBLIC_DASH_NOTEBOOK_IMAGE_TAG=${PUBLIC_DASH_NOTEBOOK_IMAGE_TAG}" >> "$GITHUB_OUTPUT" echo "PUBLIC_DASH_FRONTEND_IMAGE_TAG=${PUBLIC_DASH_FRONTEND_IMAGE_TAG}" >> "$GITHUB_OUTPUT" @@ -75,26 +75,27 @@ jobs: fi docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}_notebook:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} - - name: Update .env.tags file + - name: Update .env file run: | - echo "PUBLIC_DASH_NOTEBOOK_IMAGE_TAG=${GITHUB_REF##*/}_${{ steps.date.outputs.date }}" > .env.tags + echo "PUBLIC_DASH_NOTEBOOK_IMAGE_TAG=${GITHUB_REF##*/}_${{ steps.date.outputs.date }}" > .env if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then - echo "Workflow_dispatch: Reuse existing frontend image tag" - echo "PUBLIC_DASH_FRONTEND_IMAGE_TAG=${GITHUB_REF##*/}_${{ steps.set-tags.outputs.PUBLIC_DASH_FRONTEND_IMAGE_TAG }}" >> .env.tags + echo "Workflow_dispatch: Reuse existing frontend image tag" + echo "PUBLIC_DASH_FRONTEND_IMAGE_TAG=${GITHUB_REF##*/}_${{ steps.set-tags.outputs.PUBLIC_DASH_FRONTEND_IMAGE_TAG }}" >> .env else - echo "Push event: Update frontend image tag" - echo "PUBLIC_DASH_FRONTEND_IMAGE_TAG=${GITHUB_REF##*/}_${{ steps.date.outputs.date }}" >> .env.tags + echo "Push event: Update frontend image tag" + echo "PUBLIC_DASH_FRONTEND_IMAGE_TAG=${GITHUB_REF##*/}_${{ steps.date.outputs.date }}" >> .env fi + echo "SERVER_IMAGE_TAG=${GITHUB_REF##*/}_${{ steps.get-server-tag.outputs.SERVER_IMAGE_TAG }}" >> .env - - name: Add, Commit, Push changes to .env.tags file + - name: Add, Commit, Push changes to .env file run: | git config --local user.email "action@github.com" - git config --local user.name "Github Actions bot to update .env.tags with latest tags" + git config --local user.name "Github Actions bot to update .env with latest tags" if git diff --quiet; then - echo "Latest timestamp already present in .env.tags file, no changes to commit" + echo "Latest timestamp already present in .env file, no changes to commit" else - git add .env.tags - git commit -m "Updated docker image tags in .env.tags file to the latest timestamp" + git add .env + git commit -m "Updated docker image tags in .env file to the latest timestamp" git push origin fi diff --git a/viz_scripts/Dockerfile b/viz_scripts/Dockerfile index ab63aac..ea7669c 100644 --- a/viz_scripts/Dockerfile +++ b/viz_scripts/Dockerfile @@ -1,7 +1,7 @@ # python 3 ARG SERVER_IMAGE_TAG -# FROM shankari/e-mission-server:master_${SERVER_IMAGE_TAG} -FROM mukuflash03/e-mission-server:cleanup-cicd_${SERVER_IMAGE_TAG} +# FROM shankari/e-mission-server:${SERVER_IMAGE_TAG} +FROM mukuflash03/e-mission-server:${SERVER_IMAGE_TAG} ADD https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem /etc/ssl/certs/