This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove no job in queue log (#1897)
- Loading branch information
Showing
8 changed files
with
98 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,16 +113,9 @@ jobs: | |
|
||
- name: Feishu notification | ||
if: ${{ failure() }} | ||
uses: whatwewant/[email protected] | ||
with: | ||
url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
title: FIX ME | ||
text: | | ||
repository: ${{ github.repository }} | ||
committer: ${{ github.actor }} | ||
compare: ${{ github.event.compare }} | ||
job status: ${{ job.status }} | ||
job url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | ||
env: | ||
FEISHU_BOT_WEBHOOK_URL: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
run: go run tests/_utils/send_lark_notify.go | ||
|
||
# Debug via SSH if previous steps failed | ||
- name: Set up tmate session | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -315,16 +315,9 @@ jobs: | |
|
||
- name: Feishu notification | ||
if: ${{ failure() }} | ||
uses: whatwewant/[email protected] | ||
with: | ||
url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
title: FIX ME | ||
text: | | ||
repository: ${{ github.repository }} | ||
committer: ${{ github.actor }} | ||
compare: ${{ github.event.compare }} | ||
job status: ${{ job.status }} | ||
job url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | ||
env: | ||
FEISHU_BOT_WEBHOOK_URL: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
run: go run tests/_utils/send_lark_notify.go | ||
|
||
# Debug via SSH if previous steps failed | ||
- name: Set up tmate session | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,16 +82,9 @@ jobs: | |
|
||
- name: Feishu notification | ||
if: ${{ failure() }} | ||
uses: whatwewant/[email protected] | ||
with: | ||
url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
title: FIX ME | ||
text: | | ||
repository: ${{ github.repository }} | ||
committer: ${{ github.actor }} | ||
compare: ${{ github.event.compare }} | ||
job status: ${{ job.status }} | ||
job url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | ||
env: | ||
FEISHU_BOT_WEBHOOK_URL: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
run: go run tests/_utils/send_lark_notify.go | ||
|
||
lint: | ||
name: Lint | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,16 +55,9 @@ jobs: | |
|
||
- name: Feishu notification | ||
if: ${{ failure() }} | ||
uses: whatwewant/[email protected] | ||
with: | ||
url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
title: FIX ME | ||
text: | | ||
repository: ${{ github.repository }} | ||
committer: ${{ github.actor }} | ||
compare: ${{ github.event.compare }} | ||
job status: ${{ job.status }} | ||
job url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | ||
env: | ||
FEISHU_BOT_WEBHOOK_URL: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
run: go run tests/_utils/send_lark_notify.go | ||
|
||
# Debug via SSH if previous steps failed | ||
- name: Set up tmate session | ||
|
@@ -177,16 +170,9 @@ jobs: | |
|
||
- name: Feishu notification | ||
if: ${{ failure() }} | ||
uses: whatwewant/[email protected] | ||
with: | ||
url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
title: FIX ME | ||
text: | | ||
repository: ${{ github.repository }} | ||
committer: ${{ github.actor }} | ||
compare: ${{ github.event.compare }} | ||
job status: ${{ job.status }} | ||
job url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | ||
env: | ||
FEISHU_BOT_WEBHOOK_URL: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
run: go run tests/_utils/send_lark_notify.go | ||
|
||
# Debug via SSH if previous steps failed | ||
- name: Set up tmate session | ||
|
@@ -249,17 +235,9 @@ jobs: | |
|
||
- name: Feishu notification | ||
if: ${{ failure() }} | ||
uses: whatwewant/[email protected] | ||
with: | ||
url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
title: FIX ME | ||
text: | | ||
repository: ${{ github.repository }} | ||
committer: ${{ github.actor }} | ||
compare: ${{ github.event.compare }} | ||
job status: ${{ job.status }} | ||
job url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | ||
env: | ||
FEISHU_BOT_WEBHOOK_URL: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
run: go run tests/_utils/send_lark_notify.go | ||
# Debug via SSH if previous steps failed | ||
- name: Set up tmate session | ||
if: ${{ failure() }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,16 +77,9 @@ jobs: | |
|
||
- name: Feishu notification | ||
if: ${{ failure() }} | ||
uses: whatwewant/[email protected] | ||
with: | ||
url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
title: FIX ME | ||
text: | | ||
repository: ${{ github.repository }} | ||
committer: ${{ github.actor }} | ||
compare: ${{ github.event.compare }} | ||
job status: ${{ job.status }} | ||
job url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | ||
env: | ||
FEISHU_BOT_WEBHOOK_URL: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }} | ||
run: go run tests/_utils/send_lark_notify.go | ||
|
||
# Debug via SSH if previous steps failed | ||
- name: Set up tmate session | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package main | ||
|
||
import ( | ||
"bytes" | ||
"fmt" | ||
"io/ioutil" | ||
"net/http" | ||
"os" | ||
) | ||
|
||
func main() { | ||
url := os.Getenv("FEISHU_BOT_WEBHOOK_URL") | ||
repo := os.Getenv("GITHUB_REPOSITORY") | ||
committer := os.Getenv("GITHUB_ACTOR") | ||
jobID := os.Getenv("GITHUB_RUN_ID") | ||
jobURL := fmt.Sprintf("https://github.com/%s/actions/runs/%s", repo, jobID) | ||
msgTMPL := ` | ||
{ | ||
"msg_type": "post", | ||
"content": { | ||
"post": { | ||
"zh_cn": { | ||
"title": "FIX ME", | ||
"content": [ | ||
[ | ||
{ | ||
"tag": "text", | ||
"text": "repo :" | ||
}, | ||
{ | ||
"tag": "text", | ||
"text": "%s" | ||
} | ||
], | ||
[ | ||
{ | ||
"tag": "text", | ||
"text": "committer :" | ||
}, | ||
{ | ||
"tag": "text", | ||
"text": "%s" | ||
} | ||
], | ||
[ | ||
{ | ||
"tag": "text", | ||
"text": "url :" | ||
}, | ||
{ | ||
"tag": "a", | ||
"text": "link", | ||
"href": "%s" | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} | ||
}` | ||
jsonStr := fmt.Sprintf(msgTMPL, repo, committer, jobURL) | ||
req, err := http.NewRequest("POST", url, bytes.NewBuffer([]byte(jsonStr))) | ||
req.Header.Set("Content-Type", "application/json") | ||
client := &http.Client{} | ||
resp, err := client.Do(req) | ||
if err != nil { | ||
panic(err) | ||
} | ||
defer resp.Body.Close() | ||
body, _ := ioutil.ReadAll(resp.Body) | ||
fmt.Println("response Body:", string(body)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters