diff --git a/.github/workflows/database-restore.yml b/.github/workflows/database-restore.yml index 981db7524..820ff20ab 100644 --- a/.github/workflows/database-restore.yml +++ b/.github/workflows/database-restore.yml @@ -11,7 +11,6 @@ on: options: - test - preprod - - production confirm-production: description: Must be set to true if restoring production required: true @@ -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 @@ -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 }}