Update blank.yml no 6 #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
# Runs a single command using the runners shell | |
- name: Run a one-line script | |
run: echo Hello, world! | |
# Runs a set of commands using the runners shell | |
- name: Run a multi-line script | |
run: | | |
echo Add other actions to build, | |
echo test, and deploy your project. | |
- name: ServiceNow Change | |
uses: ServiceNow/[email protected] | |
with: | |
devops-integration-user-name: ${{ secrets.SN_USER }} | |
devops-integration-user-password: ${{ secrets.SN_PASSWORD }} | |
# ServiceNow Instance URL | |
instance-url: ${{ secrets.SN_INSTANCE_URL }} | |
# Orchestration Tool Id | |
tool-id: ${{ secrets.SN_ORCHESTRATION_TOOL_ID }} | |
# GitHub Context | |
context-github: ${{ toJSON(github) }} | |
job-name: 'ServiceNow DevOps Change' | |
change-request: '{"setCloseCode":"true","attributes":{"short_description":"Automated Software Deployment Standard Change","description":"Automated Software Deployment.","implementation_plan":"Software update is tested and results can be found in Test Summaries Tab; When the change is approved the implementation happens automated by the CICD pipeline within the change planned start and end time window.","backout_plan":"When software fails in production, the previous software release will be re-deployed.","test_plan":"Testing if the software was successfully deployed"}}' | |
ServiceNowDevOpsChange: | |
needs: build | |
# type of machine to run the job on | |
runs-on: ubuntu-latest | |
name: 'ServiceNow DevOps Change' | |
steps: | |
- name: ServiceNow Change | |
uses: ServiceNow/[email protected] | |
with: | |
# Devops Integration Token | |
devops-integration-user-name: ${{ secrets.SN_USER }} | |
devops-integration-user-password: ${{ secrets.SN_PASSWORD }} | |
instance-url: ${{ secrets.SN_INSTANCE_URL }} | |
tool-id: ${{ secrets.SN_ORCHESTRATION_TOOL_ID }} | |
# GitHub Context | |
context-github: ${{ toJSON(github) }} | |
# Display Name of the Job | |
job-name: 'ServiceNow DevOps Change' | |
change-request: '{"setCloseCode":"true","attributes":{"short_description":"Automated Software Deployment","description":"Automated Software Deployment.","implementation_plan":"Software update is tested and results can be found in Test Summaries Tab; When the change is approved the implementation happens automated by the CICD pipeline within the change planned start and end time window.","backout_plan":"When software fails in production, the previous software release will be re-deployed.","test_plan":"Testing if the software was successfully deployed"}}' | |
interval: '100' | |
timeout: '3600' | |