Skip to content

Commit

Permalink
test confirm production option
Browse files Browse the repository at this point in the history
  • Loading branch information
Neill Turner committed Dec 5, 2024
1 parent 80adcd3 commit 4d9c590
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/database-restore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
options:
- test
- preprod
- production
confirm-production:
description: Must be set to true if restoring production
required: true
Expand Down Expand Up @@ -42,6 +41,7 @@ jobs:
name: Checkout

- name: Set environment variables
if: ${{ inputs.environment != 'test' || (inputs.environment == 'test' && inputs.confirm-production == 'true' ) }}
run: |
source global_config/${{ inputs.environment }}.sh
tf_vars_file=${{ env.TF_VARS_PATH }}/${{ inputs.environment }}.tfvars.json
Expand All @@ -57,13 +57,3 @@ jobs:
BACKUP_FILE=${SERVICE_SHORT}_${CONFIG_SHORT}_${TODAY}.sql.gz
fi
echo "BACKUP_FILE=$BACKUP_FILE" >> $GITHUB_ENV
- name: Restore ${{ inputs.environment }} postgres
uses: DFE-Digital/github-actions/restore-postgres-backup@master
with:
storage-account: ${{ env.STORAGE_ACCOUNT_NAME }}
resource-group: ${{ env.RESOURCE_GROUP_NAME }}
app-name: ${{ env.SERVICE_NAME }}-${{ inputs.environment }}
cluster: ${{ env.CLUSTER }}
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
backup-file: ${{ env.BACKUP_FILE }}

0 comments on commit 4d9c590

Please sign in to comment.