Skip to content

Commit

Permalink
Merge pull request #3220 from HHS/update-staging-frontend-image-to-de…
Browse files Browse the repository at this point in the history
…ploy-gha

fix: updating the tag for the imageToDeploy for the frontend containers
  • Loading branch information
jonnalley authored Dec 16, 2024
2 parents d98482a + 5e288a7 commit 2049c49
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/dev_be_build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main
paths:
- backend/**

env:
WORKING_DIR: "backend"
DT_DOCKER_FILE: "Dockerfile.data-tools-import"
Expand All @@ -22,16 +22,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Build and publish the Docker image for ${{ github.repository }}
uses: ./.github/actions/build-and-push
with:
image_name: ${{ github.repository }}/ops-data-tools # it will be lowercased internally
github_token: ${{ secrets.GITHUB_TOKEN }}
context: ${{ github.workspace }}/${{ env.WORKING_DIR }}
dockerfile: ${{ github.workspace }}/${{ env.WORKING_DIR }}/${{ env.DT_DOCKER_FILE }}
image_tags: "unstable,${{ github.sha }}"
image_tags: "${{ github.sha }}"

build-backend:
permissions:
contents: read
Expand All @@ -49,18 +49,18 @@ jobs:
dockerfile: ${{ github.workspace }}/${{ env.WORKING_DIR }}/${{ env.BE_DOCKER_FILE }}
image_tags: "unstable,${{ github.sha }}"

deploy-data-tools:
deploy-data-tools:
needs: build-data-tools

runs-on: ubuntu-latest
steps:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Log in to Azure
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
creds: ${{ secrets.SDLC_AZURE_CREDS }}

- name: Trigger Data-Tools Job
uses: azure/cli@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2
with:
Expand All @@ -78,14 +78,14 @@ jobs:
# containerAppName: opre-ops-${{ env.ENVIRONMENT }}-data-tools
# resourceGroup: opre-ops-services-${{ env.ENVIRONMENT }}-app
# imageToDeploy: ghcr.io/hhs/opre-ops/ops-data-tools:${{ github.sha }}
deploy-backend:

deploy-backend:
needs: build-backend

runs-on: ubuntu-latest
steps:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Log in to Azure
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dev_fe_build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
context: ${{ github.workspace }}/${{ env.WORKING_DIR }}
dockerfile: ${{ github.workspace }}/${{ env.WORKING_DIR }}/${{ env.DOCKER_FILE }}
image_tags: "unstable,${{ github.sha }},${{ env.ENVIRONMENT }}"
image_tags: "${{ github.sha }},${{ env.ENVIRONMENT }}"
build_args: "VITE_BACKEND_DOMAIN=https://${{ env.ENVIRONMENT }}.${{ env.DOMAIN_NAME }}, MODE=${{ env.ENVIRONMENT }}"

deploy-frontend:
Expand All @@ -50,4 +50,4 @@ jobs:
with:
containerAppName: opre-ops-${{ env.ENVIRONMENT }}-app-${{ env.WORKING_DIR }}
resourceGroup: opre-ops-${{ env.ENVIRONMENT }}-app-rg
imageToDeploy: ghcr.io/hhs/opre-ops/ops-${{ env.WORKING_DIR }}:${{ github.sha }}
imageToDeploy: ghcr.io/hhs/opre-ops/ops-${{ env.WORKING_DIR }}:${{ env.ENVIRONMENT }}
4 changes: 2 additions & 2 deletions .github/workflows/prod_fe_build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Production Frontend Build and Deploy

on:
workflow_dispatch:

env:
WORKING_DIR: "frontend"
DOCKER_FILE: "Dockerfile.azure"
Expand Down Expand Up @@ -45,4 +45,4 @@ jobs:
with:
containerAppName: opre-ops-${{ env.ENVIRONMENT }}-app-${{ env.WORKING_DIR }}
resourceGroup: opre-ops-${{ env.ENVIRONMENT }}-app-rg
imageToDeploy: ghcr.io/hhs/opre-ops/ops-${{ env.WORKING_DIR }}:${{ github.sha }}
imageToDeploy: ghcr.io/hhs/opre-ops/ops-${{ env.WORKING_DIR }}:${{ env.ENVIRONMENT }}
2 changes: 1 addition & 1 deletion .github/workflows/stg_fe_build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ jobs:
with:
containerAppName: opre-ops-${{ env.ENVIRONMENT }}-app-${{ env.WORKING_DIR }}
resourceGroup: opre-ops-${{ env.ENVIRONMENT }}-app-rg
imageToDeploy: ghcr.io/hhs/opre-ops/ops-${{ env.WORKING_DIR }}:${{ github.sha }}
imageToDeploy: ghcr.io/hhs/opre-ops/ops-${{ env.WORKING_DIR }}:${{ env.ENVIRONMENT }}

0 comments on commit 2049c49

Please sign in to comment.