Skip to content
Snippets Groups Projects
Commit f4677106 authored by Psnail's avatar Psnail Committed by GitHub
Browse files

Update go.yml

parent fffc9c70
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ name: CI ...@@ -2,7 +2,7 @@ name: CI
on: on:
push: push:
branches: ["master", "develop"] branches: [master, develop]
pull_request: pull_request:
branches: "*" branches: "*"
...@@ -15,8 +15,12 @@ jobs: ...@@ -15,8 +15,12 @@ jobs:
matrix: matrix:
config: config:
- go_version: 1.13 - go_version: 1.13
steps:
env:
DING_TOKEN: 6374f1bf8d4f23cde81d4a4b8c1f0bc98cc92b5151ca938ab938d3d7f4230fc4
DING_SIGN: SECa98677289194bb0e5caec3051301d06515750ff1bd2f932a4704298afb2e0ae6
steps:
- name: Set up Go 1.x - name: Set up Go 1.x
uses: actions/setup-go@v2 uses: actions/setup-go@v2
...@@ -59,15 +63,13 @@ jobs: ...@@ -59,15 +63,13 @@ jobs:
- name: Coverage - name: Coverage
run: bash <(curl -s https://codecov.io/bash) run: bash <(curl -s https://codecov.io/bash)
- name: DingTalk Message Notify - name: DingTalk Message Notify only Push
# You may pin to the exact commit or the version.
# uses: zcong1993/actions-ding@2a68a4d06ed966d2e5c28178e7187c107ec57862
uses: zcong1993/actions-ding@v3.0.1 uses: zcong1993/actions-ding@v3.0.1
# if: ${{ github.repository == 'apache/dubbo-go' }} if: ${{ always() && github.event_name == 'push' && github.repository == 'apache/dubbo-go' }}
with: with:
# DingDing bot token # DingDing bot token
dingToken: 6374f1bf8d4f23cde81d4a4b8c1f0bc98cc92b5151ca938ab938d3d7f4230fc4 dingToken: $DING_TOKEN
secret: SECa98677289194bb0e5caec3051301d06515750ff1bd2f932a4704298afb2e0ae6 secret: $DING_SIGN
# Post Body to send # Post Body to send
body: | body: |
{ {
...@@ -77,3 +79,20 @@ jobs: ...@@ -77,3 +79,20 @@ jobs:
"text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - trigger: ${{ github.actor }} \n - event: ${{ github.event_name }} \n - ref: ${{ github.ref }} \n - status: [${{ job.status }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \n - environment: ${{ runner.os }} \n - SHA: ${{ github.sha }}" "text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - trigger: ${{ github.actor }} \n - event: ${{ github.event_name }} \n - ref: ${{ github.ref }} \n - status: [${{ job.status }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \n - environment: ${{ runner.os }} \n - SHA: ${{ github.sha }}"
} }
} }
- name: DingTalk Message Notify only PR
uses: zcong1993/actions-ding@v3.0.1
if: ${{ always() && github.event_name == 'pull_request' && github.repository == 'apache/dubbo-go' }}
with:
# DingDing bot token
dingToken: $DING_TOKEN
secret: $DING_SIGN
# Post Body to send
body: |
{
"msgtype": "markdown",
"markdown": {
"title": "Github Actions",
"text": "## Github Actions \n - name: CI \n - repository: ${{ github.repository }} \n - pr_title: ${{ github.event.pull_request.title }} \n - trigger: ${{ github.actor }} \n - event: ${{ github.event_name }} \n - ref: [${{ github.ref }}](${{ github.event.pull_request._links.html.href }}) \n - status: [${{ job.status }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) \n - environment: ${{ runner.os }} \n - SHA: [${{ github.sha }}](${{ github.event.pull_request._links.html.href }})"
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment