-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (46 loc) · 1.59 KB
/
validation.yml
File metadata and controls
51 lines (46 loc) · 1.59 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
name: Validation
on:
workflow_dispatch:
push:
branches-ignore:
- main
jobs:
static:
name: Validation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Python Setup
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Python Tools Setup
run: pip install -r requirements.txt
- name: Validation
run: |
set -o pipefail
iac-validate ./data/ |& tee validate_output.txt
- name: Webex Notifcation
if: always()
env:
TOKEN: ${{ secrets.WEBEX_TOKEN }}
ROOMID: ${{ secrets.WEBEX_ROOM_ID }}
MESSAGE: |
[**[${{ job.status }}] ${{ github.repository }} #${{ github.run_number }}**](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
* Commit: [${{ github.event.head_commit.message }}](${{ github.event.head_commit.url }})[${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})
* Author: ${{ github.event.sender.login }}
* Branch: ${{ github.ref }} ${{ github.head_ref }}
* Event: ${{ github.event_name }}
run: |
FULL_MESSAGE=$MESSAGE`python .ci/render-wx.py`
echo $FULL_MESSAGE
URL="https://api.ciscospark.com/v1/messages/"
curl \
-X POST \
-H "Authorization:Bearer ${TOKEN}" \
--form "roomId=${ROOMID}" \
--form "markdown=${FULL_MESSAGE}" \
${URL}