Skip to content

Commit

Permalink
Update sandboxResumeCreation.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagonnascimento authored Dec 6, 2023
1 parent da05949 commit b1c5b36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/sandboxResumeCreation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ jobs:
- name: Getting org info
id: getOrgInfo
run: |
echo ORG_INFO_RESULT="$(sf org display --target-org ${{ vars.USERNAME }}.${{ inputs.sandboxName }} --json | tr -d '\n')"
echo ORG_INFO_RESULT="$(sf org display --target-org ${{ vars.USERNAME }}.${{ inputs.sandboxName }} --json | tr -d '\n')" >> $GITHUB_OUTPUT
- name: Getting Profile Id
id: getProfileId
run: |
echo PROFILE_ID_RESULT="$(curl ${{ fromJson(steps.getOrgInfo.outputs.ORG_INFO_RESULT).result.instanceUrl }}/services/data/v58.0/query?q=SELECT+Id+FROM+Profile+WHERE+Name='System+Administrator' -H 'Authorization Bearer ${{ fromJson(steps.getOrgInfo.outputs.ORG_INFO_RESULT).result.accessToken }}' -H 'Content-Type: application/json\')"
echo PROFILE_ID_RESULT="$(curl ${{ fromJson(steps.getOrgInfo.outputs.ORG_INFO_RESULT).result.instanceUrl }}/services/data/v58.0/query?q=SELECT+Id+FROM+Profile+WHERE+Name='System+Administrator' -H 'Authorization Bearer ${{ fromJson(steps.getOrgInfo.outputs.ORG_INFO_RESULT).result.accessToken }}' -H 'Content-Type: application/json\')" >> $GITHUB_OUTPUT
- name: Creating User record
id: createUser
run: |
echo "USER_CREATE_RESULT=$(curl ${{ fromJson(steps.getOrgInfo.outputs.ORG_INFO_RESULT).result.instanceUrl }}/services/data/v59.0/sobjects/User/ -H 'Authorization Bearer ${{ fromJson(steps.getOrgInfo.outputs.ORG_INFO_RESULT).result.accessToken }}' -H 'Content-Type: application/json\' -X POST -d '{\"Username\": ${{ inputs.username }},\"FirstName\":\"Sandbox\",\"LastName\":\"Owner\",\"Email\": ${{ inputs.email }} ,\"Alias\":\"sbxown\",\"TimeZoneSidKey\":\"America/Sao_Paulo\",\"LocaleSidKey\":\"pt_BR\",\"EmailEncodingKey\":\"UTF-8\",\"ProfileId\":\"00eHp000002OQMuIAO\",\"LanguageLocaleKey\":\"en_US\"}')"
echo "USER_CREATE_RESULT=$(curl ${{ fromJson(steps.getOrgInfo.outputs.ORG_INFO_RESULT).result.instanceUrl }}/services/data/v59.0/sobjects/User/ -H 'Authorization Bearer ${{ fromJson(steps.getOrgInfo.outputs.ORG_INFO_RESULT).result.accessToken }}' -H 'Content-Type: application/json\' -X POST -d '{\"Username\": ${{ inputs.username }},\"FirstName\":\"Sandbox\",\"LastName\":\"Owner\",\"Email\": ${{ inputs.email }} ,\"Alias\":\"sbxown\",\"TimeZoneSidKey\":\"America/Sao_Paulo\",\"LocaleSidKey\":\"pt_BR\",\"EmailEncodingKey\":\"UTF-8\",\"ProfileId\":\"00eHp000002OQMuIAO\",\"LanguageLocaleKey\":\"en_US\"}')" >> $GITHUB_OUTPUT
- name: Post creation steps
if: github.event.inputs.buildfile != ''
Expand Down

0 comments on commit b1c5b36

Please sign in to comment.