Skip to content

Commit 55ed1b0

Browse files
Merge pull request #141 from salesforcecli/ew/add-service
W-18709286 adds service and test-env
2 parents 9721a35 + 46171a2 commit 55ed1b0

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/actions/ctcOpen/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ inputs:
1414
SVC_CLI_BOT_GITHUB_TOKEN:
1515
description: Github token
1616
required: true
17+
githubTag:
18+
description: 'The semver tag of the GitHub Release'
19+
required: false
1720

1821
outputs:
1922
changeCaseId:
@@ -39,7 +42,12 @@ runs:
3942
with:
4043
max_attempts: 5
4144
command: |
42-
CTC_RESULT=$(sfchangecase create --location ${{ github.repositoryUrl }} --release ${{ github.repository }}.$(date +%F) --json)
45+
if [ -n "$GITHUB_TAG" ]; then
46+
RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases/tag/$GITHUB_TAG"
47+
else
48+
RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases"
49+
fi
50+
CTC_RESULT=$(sfchangecase create --location ${{github.repositoryUrl}} --test-environment $RELEASE_URL --service platform-cli --release ${{github.repository}}.$(date +%F) --json)
4351
4452
STATUS=$(printf '%s' "$CTC_RESULT" | jq -r '.status')
4553
CTC_ID=$(printf '%s' "$CTC_RESULT" | jq -r '.result.id')
@@ -56,6 +64,7 @@ runs:
5664
SF_CHANGE_CASE_SFDX_AUTH_URL: ${{ inputs.SF_CHANGE_CASE_SFDX_AUTH_URL}}
5765
SF_CHANGE_CASE_TEMPLATE_ID: ${{ inputs.SF_CHANGE_CASE_TEMPLATE_ID}}
5866
SF_CHANGE_CASE_CONFIGURATION_ITEM: ${{ inputs.SF_CHANGE_CASE_CONFIGURATION_ITEM}}
67+
GITHUB_TAG: ${{ inputs.githubTag }}
5968

6069
- run: echo "[INFO] Change Case ID is:\ $STEPS_CTC_CTCID"
6170
shell: bash

.github/workflows/ctcOpen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
else
3636
RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases"
3737
fi
38-
CTC_RESULT=$(sfchangecase create --location ${{github.repositoryUrl}} --test-environment $RELEASE_URL --release ${{github.repository}}.$(date +%F) --json)
38+
CTC_RESULT=$(sfchangecase create --location ${{github.repositoryUrl}} --test-environment $RELEASE_URL --service platform-cli --release ${{github.repository}}.$(date +%F) --json)
3939
# Re-enable exit on error
4040
set -e
4141

0 commit comments

Comments
 (0)