-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
36 lines (31 loc) · 875 Bytes
/
action.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
29
30
31
32
33
34
35
name: google-chat-job-failed
description: Sends messages to google chat when a job fails
author: datamole-ai
branding:
icon: 'bell'
color: 'green'
inputs:
json:
description: 'list of job objects'
required: true
default: ''
gchatURL:
description: 'google chat webhook'
required: true
default: ''
initiator:
description: 'The user that should be mentioned in the message'
required: false
runs:
using: "composite"
steps:
- shell: bash
env:
NEEDS_CONTEXT: ${{ inputs.json }}
GOOGLE_CHAT_WEBHOOK: ${{ inputs.gchatURL }}
INITIATOR: ${{ inputs.initiator }}
run: |
export GITHUB_LINK=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
export HEAD=$(echo ${GITHUB_REF##*/})
export REPO_NAME=$(echo ${GITHUB_REPOSITORY#*/})
python ${{ github.action_path }}/action.py