diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 40398698e..18eff83f1 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -21,6 +21,8 @@ on: secrets: DOCKER_PASSWORD: required: false + DEV_DOCKER_PASSWORD: + required: false jobs: docker-build: @@ -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