Skip to content

Commit

Permalink
Workflow dispatch receive - 1
Browse files Browse the repository at this point in the history
Added working code for workflow dispatch receive from join repo.
  • Loading branch information
Mahadik, Mukul Chandrakant authored and Mahadik, Mukul Chandrakant committed Apr 26, 2024
1 parent 629b3a1 commit 087abcb
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/image_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ name: docker-image-push-public-dash
# events but only for the master branch
on:
push:
# Mukul:
# I've added a local test branch on my system and using it for testing image push.
# So, for testing purposes, need to checkout a branch "image-push-merge"
# TODO: Need to change to build off master or main once it looks good.
branches: [ image-push-merge ]
# Mukul:
# I've added a local test branch on my system and using it for testing image push.
# So, for testing purposes, need to checkout a branch "tags-dispatch"
# TODO: Need to change to build off master or main once it looks good.
branches: [ tags-dispatch ]

workflow_dispatch:
inputs:
docker_image_tag:
description: "Latest Docker image tags passed from e-mission-server repository on image build and push"
required: true


# Env variable
Expand All @@ -24,7 +30,7 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -42,13 +48,17 @@ jobs:
run: echo running in repo ${GITHUB_REPOSITORY#*/} branch ${GITHUB_REF##*/} on ${{ steps.date.outputs.date }}

# Runs a set of commands using the runners shell
- name: build docker image
run: |
docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} ./frontend
docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}_notebook:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} ./viz_scripts
docker images
# - name: build docker image
# run: |
# docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} ./frontend
# docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}_notebook:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} ./viz_scripts
# docker images

# - name: push docker image
# run: |
# docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
# docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}_notebook:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}

- name: push docker image
- name: Print input docker image tag
run: |
docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}_notebook:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
echo "Input latest docker image tag: ${{ github.event.inputs.docker_image_tag }}"

0 comments on commit 087abcb

Please sign in to comment.