Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

W-17239852 Add --test-environment to change case #135

Merged
merged 1 commit into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ctcOpen.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
on:
workflow_call:
inputs:
githubTag:
description: 'The semver tag of the GitHub Release'
type: string
outputs:
changeCaseId:
description: Id for the change case created
Expand All @@ -26,7 +30,12 @@ jobs:
run: |
# Temp disable exit on error
set +e
CTC_RESULT=$(sfchangecase create --location ${{github.repositoryUrl}} --release ${{github.repository}}.$(date +%F) --json)
if [ -n "$GITHUB_TAG" ]; then
RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases/tag/$GITHUB_TAG"
else
RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases"
fi
CTC_RESULT=$(sfchangecase create --location ${{github.repositoryUrl}} --test-environment $RELEASE_URL --release ${{github.repository}}.$(date +%F) --json)
# Re-enable exit on error
set -e

Expand All @@ -42,6 +51,7 @@ jobs:
exit 1
fi
env:
GITHUB_TAG: ${{ inputs.githubTag }}
SF_CHANGE_CASE_SFDX_AUTH_URL: ${{ secrets.SF_CHANGE_CASE_SFDX_AUTH_URL}}
SF_CHANGE_CASE_TEMPLATE_ID: ${{ secrets.SF_CHANGE_CASE_TEMPLATE_ID}}
SF_CHANGE_CASE_CONFIGURATION_ITEM: ${{ secrets.SF_CHANGE_CASE_CONFIGURATION_ITEM}}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/npmPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ jobs:
needs: [check-publish]
if: inputs.ctc && needs.check-publish.outputs.published == 'false'
uses: salesforcecli/github-workflows/.github/workflows/ctcOpen.yml@main
with:
githubTag: ${{ inputs.githubTag }}
secrets: inherit

npm-publish:
Expand Down