-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.6 KB
/
Copy pathdeploy.yml
File metadata and controls
52 lines (47 loc) · 1.6 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
45
46
47
48
49
50
51
52
name: Deploy
on:
workflow_dispatch:
inputs:
artifact_version:
required: true
type: string
jobs:
mytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Run a one-line script
run: echo Hello
package-registration:
needs: mytest
runs-on: ubuntu-latest
steps:
- name: SN Register Artifact
uses: ServiceNow/servicenow-devops-register-package@v3.1.0
with:
devops-integration-token: ${{ secrets.SN_TOKEN }}
instance-url: ${{ secrets.SN_URL }}
tool-id: ${{ secrets.SN_TOOL_ID }}
context-github: ${{ toJSON(github) }}
job-name: ${{ github.job }}
artifacts: '[{"name": "eli-devops", "version": "${{ inputs.artifact_version }}", "repositoryName": "${{ github.repository }}"}]'
package-name: 'eli Package - ${{ github.run_number }}'
- name: ServiceNow DevOps Change Automation
uses: ServiceNow/servicenow-devops-change@v4.0.0
with:
instance-url: ${{ secrets.SN_URL }}
devops-integration-token: ${{ secrets.SN_TOKEN }}
tool-id: ${{ secrets.SN_TOOL_ID }}
job-name: ${{ github.job }}
context-github: ${{ toJSON(github) }}
change-request: '{}'
deployment-gate: '{"environment":"Production","jobName":"My deploy test"}'
deploy:
name: My deploy test
needs: package-registration
environment: Production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Run a one-line script
run: echo Hello, world!