Created
June 23, 2020 14:56
-
-
Save recursivecodes/1f9af038a620f3e7996958364b762bf6 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 VM Instance' | |
run: | | |
echo "::set-env name=INSTANCE_OCID::$( \ | |
oci compute instance list \ | |
--lifecycle-state STOPPED \ | |
--compartment-id ${{secrets.VM_COMPARTMENT_OCID}} \ | |
--display-name ${{env.INSTANCE_NAME}} \ | |
--query "data [0].id" \ | |
--raw-output \ | |
)" | |
- name: 'Start VM' | |
if: ${{env.INSTANCE_OCID}} | |
run: | | |
oci compute instance action \ | |
--action start \ | |
--instance-id ${{ env.INSTANCE_OCID }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment