Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AjitPadhi-Microsoft committed Dec 5, 2024
1 parent b3b9553 commit 807d17c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
name: Test Step
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
- run: git branch
- run: env

docker-build:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
strategy:
Expand All @@ -48,5 +48,6 @@ jobs:
username: ${{ github.event.workflow_run.head_branch == 'main' && 'fruoccopublic' || 'cwydcontainerreg'}}
app_name: ${{ matrix.app_name }}
dockerfile: ${{ matrix.dockerfile }}
push: ${{ github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'dev' || github.event.workflow_run.head_branch == 'demo' }}
branch: ${{ github.event.workflow_run.head_branch }}
push: ${{ github.event_name == 'workflow_run' && (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'dev' || github.event.workflow_run.head_branch == 'demo') }}
secrets: inherit
7 changes: 7 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
dockerfile:
required: true
type: string
branch:
required: true
type: string
push:
required: true
type: boolean
Expand All @@ -28,6 +31,10 @@ jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- name: Get branch detail
run: |
echo "Input status ${{ inputs.push }}"
echo "Input branch ${{ inputs.branch }}"
- name: Docker Login
if: ${{ inputs.push == true && github.ref_name == 'main' }}
Expand Down

0 comments on commit 807d17c

Please sign in to comment.