-
Notifications
You must be signed in to change notification settings - Fork 10
44 lines (42 loc) · 1.89 KB
/
Copy pathctcClose.yml
File metadata and controls
44 lines (42 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
on:
workflow_call:
inputs:
changeCaseId:
description: "Id for the change case created"
type: string
required: true
status:
required: false
description: CTC status, like "Implemented - per plan", "Not Implemented"
default: Implemented - per plan
type: string
nodeVersion:
description: version of node to use. It's better to specify latest, lts/* or lts/-1 than to hardode numbers
type: string
default: lts/*
required: false
jobs:
ctcClose:
runs-on: static-ip-ubuntu-24-runners
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion }}
# No `cache: npm`: it requires an npm lockfile and so hard-fails on
# pnpm/yarn consumer repos; the CTC CLI below is a one-off global install.
- run: npm install -g @salesforce/change-case-management --omit=dev
- id: ctc
run: |
if [ -z "${SF_CHANGE_CASE_SFDX_AUTH_URL}" ] || [ -z "${SF_CHANGE_CASE_TEMPLATE_ID}" ] || [ -z "${SF_CHANGE_CASE_CONFIGURATION_ITEM}" ] ; then
echo "Environment not configured for CTC. Your environment needs SF_CHANGE_CASE_SFDX_AUTH_URL, SF_CHANGE_CASE_TEMPLATE_ID, and SF_CHANGE_CASE_CONFIGURATION_ITEM"
exit 1
else
sfchangecase close --location ${{ github.repositoryUrl }} --release ${{github.repository}}.$(date +%F) --changecaseid "$INPUTS_CHANGE_CASE_ID" --status "$INPUTS_STATUS"
fi
env:
INPUTS_CHANGE_CASE_ID: ${{ inputs.changeCaseId}}
INPUTS_STATUS: ${{ inputs.status}}
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}}