Skip to content

Commit d4f3799

Browse files
authored
Update scaffolder.yaml
1 parent 7141d48 commit d4f3799

File tree

1 file changed

+10
-41
lines changed

1 file changed

+10
-41
lines changed

.github/workflows/scaffolder.yaml

Lines changed: 10 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,28 @@ on:
33
push:
44
branches: main
55
jobs:
6-
test:
7-
runs-on: ubuntu-latest
8-
env:
9-
ACTIONS_STEP_DEBUG: true
10-
steps:
11-
- name: Test Change Creation Only
12-
run: |
13-
echo "Testing ServiceNow change creation..."
14-
RESPONSE=$(curl -X POST "https://dev208227.service-now.com/api/sn_devops/v1/devops/orchestration/changeControl" \
15-
-H "Content-Type: application/json" \
16-
-H "Accept: application/json" \
17-
-H "Authorization: sn_devops.DevOpsToken 35432ff783d87210340974b6feaad3bb:${{ secrets.SN_DEVOPS_TOKEN }}" \
18-
-d '{
19-
"toolId": "35432ff783d87210340974b6feaad3bb",
20-
"stageName": "test",
21-
"buildNumber": "'${{ github.run_id }}'",
22-
"attemptNumber": "1",
23-
"sha": "'${{ github.sha }}'",
24-
"workflow": "test-minimal",
25-
"repository": "schdief/template",
26-
"branchName": "main",
27-
"changeRequestDetails": {}
28-
}' \
29-
-w "\nHTTP Status: %{http_code}\n")
30-
31-
echo "$RESPONSE"
32-
echo "---"
33-
echo "If you see a change number above, creation worked!"
34-
echo "If you see an error, that's why the action is failing!"
35-
366
ServiceNowDevOpsChange:
377
runs-on: ubuntu-latest
388
env:
399
ACTIONS_STEP_DEBUG: true
4010
steps:
41-
- name: ServiceNowDevOpsChange
11+
- name: ServiceNow DevOps Change (Basic Auth)
4212
uses: ServiceNow/servicenow-devops-change@main
4313
id: change_request
4414
with:
45-
devops-integration-token: ${{ secrets.SN_DEVOPS_TOKEN }}
15+
# Use username/password instead of token
16+
devops-integration-user-name: admin
17+
devops-integration-user-password: ${{ secrets.SN_DEVOPS_PASSWORD }}
4618
instance-url: https://dev208227.service-now.com
4719
tool-id: 35432ff783d87210340974b6feaad3bb
4820
context-github: ${{ toJSON(github) }}
49-
job-name: 'ServiceNow DevOps Change'
50-
# Use minimal change request - let ServiceNow use defaults
51-
change-request: '{"attributes":{"priority":"2","comments":"Automated deployment from GitHub Actions","short_description":"Deploy from GitHub workflow scaffolder"}}'
52-
timeout: '600'
53-
interval: '30'
54-
55-
- name: Show Change Request Details
21+
job-name: 'ServiceNowDevOpsChange'
22+
change-request: '{}'
23+
24+
- name: Show Results
5625
run: |
57-
echo "Change Request Number: ${{ steps.change_request.outputs.change-request-number }}"
58-
echo "Change Request Sys ID: ${{ steps.change_request.outputs.change-request-sys-id }}"
26+
echo "✅ Change Number: ${{ steps.change_request.outputs.change-request-number }}"
27+
echo "✅ Change Sys ID: ${{ steps.change_request.outputs.change-request-sys-id }}"
5928
deploy:
6029
name: 'Deploy'
6130
needs: ServiceNowDevOpsChange

0 commit comments

Comments
 (0)