Compare commits
No commits in common. "d4587a67d30b6bf767cd4ed338d17d7237c18a74" and "356fb6602449b8548ad44781e44a228a949c4795" have entirely different histories.
d4587a67d3
...
356fb66024
@ -19,5 +19,5 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node12'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
@ -1,57 +0,0 @@
|
|||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
Build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Private Actions Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
### show time now
|
|
||||||
####
|
|
||||||
####
|
|
||||||
-
|
|
||||||
name: Get Data
|
|
||||||
id: getDingData
|
|
||||||
run: |
|
|
||||||
# 输出仓库名
|
|
||||||
REPOSITORY="${{GITHUB.REPOSITORY}}"
|
|
||||||
echo "::set-output name=REPOSITORY::${REPOSITORY#*/}"
|
|
||||||
|
|
||||||
# 获取用户仓库信息
|
|
||||||
RESPONSE="$(curl -sLm 10 https://api.github.com/repos/${{ GITHUB.REPOSITORY }})"
|
|
||||||
# 建议填写自己的 TOKEN
|
|
||||||
# RESPONSE="$(curl -sLm 10 https://api.github.com/repos/${{ GITHUB.REPOSITORY }} -H "Authorization: token ${{ SECRETS.TOKEN_GITHUB }}")"
|
|
||||||
|
|
||||||
# 获取 用户仓库 设置的 描述,如果为空,可能是没有使用 TOKEN
|
|
||||||
DESCRIPTION="$(jq -r .description <(echo ${RESPONSE}))"
|
|
||||||
echo "::set-output name=DESCRIPTION::${DESCRIPTION}"
|
|
||||||
|
|
||||||
# 获取 用户仓库 设置的 URL, 如果没有就输出 Github 地址
|
|
||||||
URL="$(jq -r .homepage <(echo ${RESPONSE}))"
|
|
||||||
if [[ "${URL}" != "null" || "${URL}" != "" ]]; then
|
|
||||||
echo "::set-output name=URL::${URL}"
|
|
||||||
else
|
|
||||||
echo "::set-output name=URL::${{ GITHUB.SERVER_URL }}/${{ GITHUB.REPOSITORY }}"
|
|
||||||
fi
|
|
||||||
-
|
|
||||||
name: Send dingding notify
|
|
||||||
uses: zcong1993/actions-ding@master
|
|
||||||
with:
|
|
||||||
dingToken: ${{ SECRETS.DING_TOKEN }}
|
|
||||||
secret: ${{ SECRETS.DING_SECRET }}
|
|
||||||
body: |
|
|
||||||
{
|
|
||||||
"msgtype": "link",
|
|
||||||
"link": {
|
|
||||||
"text": "${{ steps.getDingData.outputs.DESCRIPTION }}",
|
|
||||||
"title": "${{ steps.getDingData.outputs.REPOSITORY }} WorkFlow ${{ GITHUB.JOB }} Success!",
|
|
||||||
"picUrl": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
|
|
||||||
"messageUrl": "${{ steps.getDingData.outputs.URL }}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user