Skip to content

Commit

Permalink
updated deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjfirth committed Jun 20, 2024
1 parent 7e771e5 commit 9fe5f34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@ concurrency:
env:
AZ_FRONTDOOR_URL: ${{ inputs.environment == 'staging' && secrets.AZ_FRONTDOOR_URL_STAGING || secrets.AZ_FRONTDOOR_URL }}
GCR_DOCKER_IMAGE: sts-content-and-support
ACR_DOCKER_IMAGE: sts-content-and-support
ACR_DOCKER_IMAGE: cs-content-support-app
GITHUB_CONTAINER_REGISTRY: ghcr.io
ORG_NAME: dfe-digital

jobs:
pull-image-from-gcr-and-publish-to-acr:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Pull Image From GitHub Container Registry and Publish to Azure Container Registry
environment: ${{ inputs.environment }}
needs: upgrade-database

steps:
- name: GitHub Container Registry Login
Expand All @@ -55,10 +54,10 @@ jobs:
docker push ${{ secrets.AZ_ACR_URL }}/${{ env.ACR_DOCKER_IMAGE }}:${{ inputs.branch }}-${{ inputs.checked-out-sha }}-${{ inputs.environment }}
deploy-image:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Deploy Image To ${{ inputs.environment }}
environment: ${{ inputs.environment }}
needs: [upgrade-database, pull-image-from-gcr-and-publish-to-acr]
needs: [pull-image-from-gcr-and-publish-to-acr]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -86,3 +85,4 @@ jobs:
--image ${{ secrets.AZ_ACR_URL }}/${{ env.ACR_DOCKER_IMAGE }}:${{ inputs.branch }}-${{ inputs.checked-out-sha }}-${{ inputs.environment }} \
--output none
&> /dev/null
7 changes: 4 additions & 3 deletions .github/workflows/matrix-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ jobs:
uses: ./.github/workflows/create-tag-release.yml
secrets: inherit

deploy-to-dev-and-test:

deploy-to-dev:
needs: [set-env, create-and-publish-image]
name: Deploy to Dev
name: Deployment to Dev & Test
strategy:
max-parallel: 1
fail-fast: true
Expand All @@ -55,4 +56,4 @@ jobs:
environment: ${{ matrix.target }}
branch: ${{ needs.set-env.outputs.branch }}
checked-out-sha: ${{ needs.set-env.outputs.checked-out-sha }}
secrets: inherit
secrets: inherit

0 comments on commit 9fe5f34

Please sign in to comment.