Skip to content

Commit

Permalink
added workflow v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Tope Emmanuel committed Sep 15, 2023
1 parent a45e5e0 commit 1e6ffb9
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,25 +420,25 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- uses: DfE-Digital/keyvault-yaml-secret@v1
id: keyvault-yaml-secret
with:
keyvault: ${{ secrets.KEY_VAULT}}
secret: SE-INFRA-SECRETS
key: SLACK-WEBHOOK , SLACK-RELEASE-NOTE-WEBHOOK , PAAS-USERNAME , PAAS-PASSWORD
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - uses: DfE-Digital/keyvault-yaml-secret@v1
# id: keyvault-yaml-secret
# with:
# keyvault: ${{ secrets.KEY_VAULT}}
# secret: SE-INFRA-SECRETS
# key: SLACK-WEBHOOK , SLACK-RELEASE-NOTE-WEBHOOK , PAAS-USERNAME , PAAS-PASSWORD
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Cloud Foundry
if: matrix.environment == 'Review'
run: cf login -a api.london.cloud.service.gov.uk -u ${{steps.keyvault-yaml-secret.outputs.PAAS-USERNAME}} -p "${{steps.keyvault-yaml-secret.outputs.PAAS-PASSWORD}}" -s get-into-teaching
# - name: Login to Cloud Foundry
# if: matrix.environment == 'Review'
# run: cf login -a api.london.cloud.service.gov.uk -u ${{steps.keyvault-yaml-secret.outputs.PAAS-USERNAME}} -p "${{steps.keyvault-yaml-secret.outputs.PAAS-PASSWORD}}" -s get-into-teaching

- name: Get Static Route
if: matrix.environment == 'Review'
run: |
cf delete-orphaned-routes -f
STATIC_ROUTE=$( ${GITHUB_WORKSPACE}/script/get_next_mapping.sh ${{env.REVIEW_APPLICATION}}-${{github.event.number}} )
echo "STATIC_ROUTE=${STATIC_ROUTE}" >> $GITHUB_ENV
# - name: Get Static Route
# if: matrix.environment == 'Review'
# run: |
# cf delete-orphaned-routes -f
# STATIC_ROUTE=$( ${GITHUB_WORKSPACE}/script/get_next_mapping.sh ${{env.REVIEW_APPLICATION}}-${{github.event.number}} )
# echo "STATIC_ROUTE=${STATIC_ROUTE}" >> $GITHUB_ENV

# - name: Trigger Deployment to ${{matrix.environment}}
# if: matrix.environment == 'Review'
Expand All @@ -454,7 +454,7 @@ jobs:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Trigger Deployment to ${{matrix.environment}}_aks
# if: matrix.environment == 'Review'
# if: matrix.environment == 'review_aks'
# uses: ./.github/workflows/actions/deploy_v2
# with:
# environment: ${{ github.event.inputs.environment }}
Expand All @@ -463,7 +463,7 @@ jobs:
# pr: ${{github.event.number}}

# - name: Trigger Deployment to ${{matrix.environment}}
# if: matrix.environment != 'Review'
# if: matrix.environment != 'Review' AND (!contains(matrix.environment,'aks'))
# uses: ./.github/workflows/actions/deploy
# with:
# environment: ${{matrix.environment}}
Expand All @@ -474,7 +474,7 @@ jobs:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Trigger Deployment to ${{matrix.environment}}
if: matrix.environment != 'Review_aks'
if: (matrix.environment != 'review_aks') AND (contains(matrix.environment,'aks'))
uses: ./.github/workflows/actions/deploy_v2
with:
environment: ${{ github.event.inputs.environment }}
Expand Down

0 comments on commit 1e6ffb9

Please sign in to comment.