Skip to content

Commit

Permalink
Matrix build send - 1
Browse files Browse the repository at this point in the history
Copied over YAML file from e-mission-server repo after successfully implementing transmission of docker image tags from e-mission-server to join with artifacts and workflow dispatch.

Added another dispatch job to trigger workflow via matrix strategy.
  • Loading branch information
Mahadik, Mukul Chandrakant authored and Mahadik, Mukul Chandrakant committed Apr 26, 2024
1 parent 94c129b commit 0dd1245
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/image_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: docker image
# TODO: Change to master branch once changes are final.
on:
push:
branches: [ tags-dispatch ]
branches: [ tags-matrix ]


# Env variable
Expand Down Expand Up @@ -48,12 +48,21 @@ jobs:
# run: |
# docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}

dispatch:
runs-on: ubuntu-latest
strategy:
matrix:
repo: ['MukuFlash03/nrel-openpath-join-page', 'MukuFlash03/op-admin-dashboard', 'MukuFlash03/em-public-dashboard']

steps:
- uses: actions/checkout@v2

- name: Trigger workflow in join-page, admin-dash, public-dash
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GH_FG_PAT_TAGS }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/MukuFlash03/nrel-openpath-join-page/actions/workflows/90148778/dispatches \
https://api.github.com/repos/${{ matrix.repo }}/actions/workflows/image_build_push.yml/dispatches \
-d '{"ref":"tags-dispatch", "inputs": {"docker_image_tag" : "${{ steps.date.outputs.date }}"}}'

0 comments on commit 0dd1245

Please sign in to comment.