forked from e-mission/e-mission-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d92f09
commit ae30920
Showing
3 changed files
with
42 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,9 +168,16 @@ jobs: | |
echo "Latest server image tag (${{ github.event_name }}): ${{ steps.get-server-tag.outputs.SERVER_IMAGE_TAG }}" | ||
fi | ||
- name: docker login | ||
run: | | ||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
# - name: docker login | ||
# run: | | ||
# docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get current date # get the date of the build | ||
id: date | ||
|
@@ -182,12 +189,15 @@ jobs: | |
- name: build docker image | ||
run: | | ||
if [ "${{ inputs.repo }}" = "e-mission-server" ]; then | ||
docker build -t $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} . | ||
# docker build -t $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} . | ||
docker build -t ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} . | ||
elif [ "${{ inputs.repo }}" = "nrel-openpath-join-page" ]; then | ||
if [ "${{ github.event_name }}" == "release" ]; then | ||
docker build -t $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} ./frontend | ||
# docker build -t $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} ./frontend | ||
docker build -t ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} ./frontend | ||
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
docker build -t $DOCKER_USER/${{ inputs.repo }}:${{ steps.increment-release-tag.outputs.new_repo_version }} ./frontend | ||
# docker build -t $DOCKER_USER/${{ inputs.repo }}:${{ steps.increment-release-tag.outputs.new_repo_version }} ./frontend | ||
docker build -t ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}:${{ steps.increment-release-tag.outputs.new_repo_version }} ./frontend | ||
fi | ||
elif [ "${{ inputs.repo }}" = "op-admin-dashboard" ]; then | ||
SERVER_IMAGE_TAG=${{ steps.get-server-tag.outputs.SERVER_IMAGE_TAG }} docker compose -f docker-compose-prod.yml build | ||
|
@@ -201,16 +211,21 @@ jobs: | |
run: | | ||
if [ "${{ inputs.repo }}" = "op-admin-dashboard" ]; then | ||
if [ "${{ github.event_name }}" == "release" ]; then | ||
docker image tag e-mission/opdash:0.0.1 $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
# docker image tag e-mission/opdash:0.0.1 $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
docker tag e-mission/opdash:0.0.1 ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
docker image tag e-mission/opdash:0.0.1 $DOCKER_USER/${{ inputs.repo }}:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
# docker image tag e-mission/opdash:0.0.1 $DOCKER_USER/${{ inputs.repo }}:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
docker tag e-mission/opdash:0.0.1 ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
fi | ||
elif [ "${{ inputs.repo }}" = "em-public-dashboard" ]; then | ||
if [ "${{ github.event_name }}" == "release" ]; then | ||
docker image tag em-pub-dash-prod/frontend:latest $DOCKER_USER/${{ inputs.repo }}_frontend:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
docker image tag em-pub-dash-prod/viz-scripts:latest $DOCKER_USER/${{ inputs.repo }}_notebook:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
# docker image tag em-pub-dash-prod/frontend:latest $DOCKER_USER/${{ inputs.repo }}_frontend:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
# docker image tag em-pub-dash-prod/viz-scripts:latest $DOCKER_USER/${{ inputs.repo }}_notebook:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
docker tag em-pub-dash-prod/frontend:latest ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}_frontend:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
docker tag em-pub-dash-prod/viz-scripts:latest ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}_notebook:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
docker image tag em-pub-dash-prod/viz-scripts:latest $DOCKER_USER/${{ inputs.repo }}_notebook:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
# docker image tag em-pub-dash-prod/viz-scripts:latest $DOCKER_USER/${{ inputs.repo }}_notebook:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
docker tag em-pub-dash-prod/viz-scripts:latest ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}_notebook:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
fi | ||
fi | ||
|
@@ -219,19 +234,25 @@ jobs: | |
run: | | ||
if [ "${{ inputs.repo }}" = "em-public-dashboard" ]; then | ||
if [ "${{ github.event_name }}" == "release" ]; then | ||
docker push $DOCKER_USER/${{ inputs.repo }}_frontend:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
docker push $DOCKER_USER/${{ inputs.repo }}_notebook:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
# docker push $DOCKER_USER/${{ inputs.repo }}_frontend:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
# docker push $DOCKER_USER/${{ inputs.repo }}_notebook:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
docker push ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}_frontend:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
docker push ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}_notebook:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
docker push $DOCKER_USER/${{ inputs.repo }}_notebook:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
# docker push $DOCKER_USER/${{ inputs.repo }}_notebook:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
docker push ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}_notebook:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
fi | ||
elif [ "${{ inputs.repo }}" = "op-admin-dashboard" ] || [ "${{ inputs.repo }}" = "nrel-openpath-join-page" ]; then | ||
if [ "${{ github.event_name }}" == "release" ]; then | ||
docker push $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
# docker push $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
docker push ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
docker push $DOCKER_USER/${{ inputs.repo }}:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
# docker push $DOCKER_USER/${{ inputs.repo }}:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
docker push ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}:${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
fi | ||
else | ||
docker push $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
# docker push $DOCKER_USER/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
docker push ghcr.io/MukuFlash03/${{ inputs.repo }}/${{ inputs.repo }}:${{ steps.fetch-latest-release-tags.outputs.tag_name }} | ||
fi | ||
- name: Update .env file | ||
|
@@ -268,7 +289,7 @@ jobs: | |
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Github Actions bot to update .env with latest tags" | ||
git config --local user.name "Github Actions bot to create new tags and publish releases" | ||
git tag -a ${{ steps.increment-release-tag.outputs.new_repo_version }} -m"$(git log --pretty=format:%s ${{ steps.set-tags.outputs.CURRENT_REPO_TAG }}...HEAD --no-merges)" | ||
git push origin ${{ steps.increment-release-tag.outputs.new_repo_version }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ FROM ubuntu:jammy-20240227 | |
|
||
MAINTAINER K. Shankari ([email protected]) | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/MukuFlash03/e-mission-server | ||
|
||
WORKDIR /usr/src/app | ||
|
||
RUN apt-get -y -qq update | ||
|