Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ jobs:
dockerfile: docker/Frontend.Dockerfile
uses: ./.github/workflows/build-docker.yml
with:
old_registry: ${{ github.ref_name == 'main' && 'fruoccopublic.azurecr.io' }}
new_registry: 'cwydcontainerreg.azurecr.io'
old_username: ${{ github.ref_name == 'main' && 'fruoccopublic' }}
new_username: 'cwydcontainerreg'
app_name: ${{ matrix.app_name }}
dockerfile: ${{ matrix.dockerfile }}
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ name: Reusable Docker build and push workflow
on:
workflow_call:
inputs:
old_registry:
required: true
type: string
old_username:
required: true
type: string
new_registry:
required: true
type: string
Expand Down Expand Up @@ -37,15 +31,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# Login for 'main' branch to both registries
- name: Docker Login to fruoccopublic (Main)
if: ${{ inputs.push == true && github.ref_name == 'main' }}
uses: docker/login-action@v3
with:
registry: ${{ inputs.old_registry }}
username: ${{ inputs.old_username }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker Login to cwydcontainerreg (Main)
if: ${{ inputs.push == true && github.ref_name == 'main' }}
uses: docker/login-action@v3
Expand All @@ -70,18 +55,6 @@ jobs:
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Build Docker Image and optionally push (Old Registry)
if: ${{ github.ref_name == 'main' }}
uses: docker/build-push-action@v6
with:
context: .
file: ${{ inputs.dockerfile }}
push: ${{ inputs.push }}
cache-from: type=registry,ref=${{ inputs.old_registry }}/${{ inputs.app_name }}:${{ github.ref_name == 'main' && 'latest' || github.head_ref || github.ref_name }}
tags: |
${{ inputs.old_registry }}/${{ inputs.app_name }}:${{ github.ref_name == 'main' && 'latest' || github.head_ref || 'default' }}
${{ inputs.old_registry }}/${{ inputs.app_name }}:${{ steps.date.outputs.date }}_${{ github.run_number }}

- name: Build Docker Image and optionally push (New Registry)
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo'|| github.ref_name == 'dependabotchanges' }}
uses: docker/build-push-action@v6
Expand Down