|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
| 3 | +name: Record event on devprogramresources |
| 4 | + |
| 5 | +# Controls when the workflow will run |
| 6 | +on: |
| 7 | + # Triggers the workflow on push or pull request events but only for the "main" branch |
| 8 | + push: |
| 9 | + paths: |
| 10 | + - Prompts/** |
| 11 | +# branches: [ "main" ] |
| 12 | +# pull_request: |
| 13 | +# branches: [ "main" ] |
| 14 | +# issues: |
| 15 | +# types: [opened, closed] |
| 16 | +# branches: main |
| 17 | +# pull_request_target: |
| 18 | +# types: [opened, closed] |
| 19 | +# branches: main |
| 20 | + |
| 21 | + # Allows you to run this workflow manually from the Actions tab |
| 22 | + workflow_dispatch: |
| 23 | + |
| 24 | +jobs: |
| 25 | + deployment: |
| 26 | + runs-on: ubuntu-latest |
| 27 | + steps: |
| 28 | + - name: Log payload |
| 29 | + env: |
| 30 | + GITHUB_CONTEXT: ${{ toJson(github) }} |
| 31 | + run: | |
| 32 | + echo "$GITHUB_CONTEXT" |
| 33 | + - name: Contact CR |
| 34 | + id: myRequest |
| 35 | + uses: fjogeleit/http-request-action@v1.8.1 |
| 36 | + with: |
| 37 | + url: ${{ format('https://{0}.service-now.com/api/x_snc_ehd_servic_0/githubpromptlibrary', secrets.SN_INSTANCE_NAME) }} |
| 38 | + method: 'POST' |
| 39 | + contentType: application/json |
| 40 | + data: ${{ toJson(github) }} |
| 41 | + username: ${{ secrets.ADMIN_USERNAME }} |
| 42 | + password: ${{ secrets.ADMIN_PASSWORD }} |
| 43 | + - name: Show Response |
| 44 | + run: echo ${{ steps.myRequest.outputs.response }} |
| 45 | + |
| 46 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 47 | +# jobs: |
| 48 | +# # This workflow contains a single job called "build" |
| 49 | +# build: |
| 50 | +# # The type of runner that the job will run on |
| 51 | +# runs-on: ubuntu-latest |
| 52 | + |
| 53 | +# # Steps represent a sequence of tasks that will be executed as part of the job |
| 54 | +# steps: |
| 55 | +# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 56 | +# - uses: actions/checkout@v3 |
| 57 | + |
| 58 | +# # Runs a single command using the runners shell |
| 59 | +# - name: Run a one-line script |
| 60 | +# run: echo Hello, world! |
| 61 | + |
| 62 | +# # Runs a set of commands using the runners shell |
| 63 | +# - name: Run a multi-line script |
| 64 | +# run: | |
| 65 | +# echo Add other actions to build, |
| 66 | +# echo test, and deploy your project. |
0 commit comments