forked from nautobot/nautobot
-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (27 loc) · 957 Bytes
/
sandbox.yml
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
---
name: "Update Nautobot Sandbox"
on:
push:
branches:
- "develop"
- "next"
- "main"
jobs:
webhook:
runs-on: "ubuntu-20.04"
steps:
- run: "echo branch_name=$(echo ${{ github.ref }} | sed 's@refs/heads/@@') >> $GITHUB_OUTPUT"
id: "git"
- name: "Call Webhook"
run: |
curl --location --request POST --user "${{ secrets.SANDBOX_GITHUB_USERNAME }}:${{ secrets.SANDBOX_GITHUB_TOKEN }}"\
--header 'Content-Type: application/json' \
--header 'Accept: application/vnd.github.everest-preview+json' \
--data '{
"ref": "${{ secrets.SANDBOX_BRANCH }}",
"inputs": {
"hash": "${{ github.sha }}",
"environment": "${{ steps.git.outputs.branch_name }}"
}
}' \
'https://api.github.com/repos/networktocode-llc/sandbox-nautobot/actions/workflows/webhook.yml/dispatches'