Skip to content

Commit

Permalink
ci: build docker updated for dev (#1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roopan-Microsoft authored Nov 25, 2024
1 parent 903c259 commit 4cf2972
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ on:
secrets:
DOCKER_PASSWORD:
required: false
DEV_DOCKER_PASSWORD:
required: false

jobs:
docker-build:
Expand All @@ -31,13 +33,21 @@ jobs:
uses: actions/checkout@v4

- name: Docker Login
if: ${{ inputs.push }}
if: ${{ inputs.push == true && contains(github.ref, 'refs/heads/main') }}
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Dev Docker Login
if: ${{ inputs.push == true && (contains(github.ref, 'refs/heads/dev') || contains(github.ref, 'refs/heads/demo')) }}
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
password: ${{ secrets.DEV_DOCKER_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down

0 comments on commit 4cf2972

Please sign in to comment.