init
This commit is contained in:
parent
9846d50fd9
commit
9cca1b5dbd
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.10
|
FROM appropriate/curl:latest
|
||||||
|
|
||||||
COPY LICENSE README.md /
|
COPY LICENSE README.md /
|
||||||
|
|
||||||
|
|
12
README.md
12
README.md
|
@ -1,5 +1,11 @@
|
||||||
# Container Action Template
|
# DingDing Notify Action
|
||||||
|
|
||||||
To get started, click the `Use this template` button on this repository [which will create a new repository based on this template](https://github.blog/2019-06-06-generate-new-repositories-with-repository-templates/).
|
Send dingding simple notify message.
|
||||||
|
|
||||||
For info on how to build your first Container action, see the [toolkit docs folder](https://github.com/actions/toolkit/blob/master/docs/container-action.md).
|
```yaml
|
||||||
|
- name: Send dingding notify
|
||||||
|
uses: zcong1993/actions-ding@master
|
||||||
|
with:
|
||||||
|
dingToken: ${{ secrets.DING_TOKEN }}
|
||||||
|
message: test message
|
||||||
|
```
|
||||||
|
|
18
action.yml
18
action.yml
|
@ -1,12 +1,14 @@
|
||||||
name: 'Container Action Template'
|
name: 'DingDing Notify Action'
|
||||||
description: 'Get started with Container actions'
|
description: 'Send dingding simple notify message'
|
||||||
author: 'GitHub'
|
author: 'zcong1993'
|
||||||
inputs:
|
inputs:
|
||||||
myInput:
|
dingToken:
|
||||||
description: 'Input to use'
|
description: 'DingDing bot token'
|
||||||
default: 'world'
|
required: true
|
||||||
|
message:
|
||||||
|
description: 'Message to send'
|
||||||
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
args:
|
|
||||||
- ${{ inputs.myInput }}
|
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
#!/bin/sh -l
|
#!/bin/sh -l
|
||||||
|
|
||||||
echo "hello $1"
|
url="https://oapi.dingtalk.com/robot/send?access_token=${INPUT_DINGTOKEN}"
|
||||||
|
|
||||||
|
curl "$url" \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d "{\"msgtype\": \"text\",
|
||||||
|
\"text\": {
|
||||||
|
\"content\": \"${INPUT_MESSAGE}\"
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
|
Loading…
Reference in New Issue