Created
June 23, 2020 14:56
-
-
Save recursivecodes/8d0bc7f711cadb68a30b1073847937a5 to your computer and use it in GitHub Desktop.
start-qa-workflow.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: 'Check Running DB Instance' | |
run: | | |
echo "::set-env name=DB_STATE::$( \ | |
oci db autonomous-database get \ | |
--autonomous-database-id ${{ secrets.AUTONOMOUS_DB_OCID }} \ | |
--query "data.\"lifecycle-state\"" \ | |
--raw-output \ | |
)" | |
- name: 'Start DB' | |
if: ${{env.DB_STATE == 'STOPPED'}} | |
run: | | |
oci db autonomous-database start \ | |
--autonomous-database-id ${{ secrets.AUTONOMOUS_DB_OCID }} \ | |
--wait-for-state AVAILABLE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment