Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created February 22, 2021 18:36
Show Gist options
  • Save recursivecodes/2929ef089b059228ec26c751d21c2665 to your computer and use it in GitHub Desktop.
Save recursivecodes/2929ef089b059228ec26c751d21c2665 to your computer and use it in GitHub Desktop.
build.yaml
- name: 'Create Plan Job'
  if: ${{env.STACK_ID != ''}}
  run: |
    echo "PLAN_JOB_ID=$(oci resource-manager job create-plan-job \
      --stack-id $STACK_ID --wait-for-state SUCCEEDED | jq '.data.id' -r)" >> $GITHUB_ENV
- name: 'Apply Plan Job'
  if: ${{env.PLAN_JOB_ID != ''}}
  run: |
    echo "APPLY_JOB_ID=$(oci resource-manager job create-apply-job \
      --execution-plan-strategy FROM_PLAN_JOB_ID \
      --execution-plan-job-id $PLAN_JOB_ID \
      --stack-id $STACK_ID \
      --wait-for-state SUCCEEDED | jq '.data.id' -r)" >> $GITHUB_ENV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment