提交指纹-[kong] #244
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
name: issue opened and edited | |
on: | |
issues: | |
types: [ opened,edited ] | |
jobs: | |
check-issues: | |
runs-on: ubuntu-latest | |
env: | |
PAYLOAD: ${{toJSON(github.event)}} | |
if: contains(github.event.issue.title,'[') && contains(github.event.issue.title,']') | |
steps: | |
- name: Check out code | |
uses: actions/checkout@master | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Install ObserverWard | |
run: | | |
curl -L https://github.com/0x727/ObserverWard_0x727/releases/download/default/observer_ward_amd64 --output ~/.config/observer_ward/observer_ward_amd64 --create-dirs -s | |
chmod +x ~/.config/observer_ward/observer_ward_amd64 | |
- name: Check Issue | |
id: issue_helper | |
run: | | |
python .github/scripts/issue_helper.py > /tmp/verify.log | |
- name: Read Verify.log | |
id: verify_log | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: /tmp/verify.log | |
- name: Create Verify Comment | |
id: create_comment | |
uses: actions-cool/issues-helper@v3 | |
with: | |
actions: 'create-comment' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
## 验证过程: | |
<details><summary>点击展开查看</summary> | |
<p> | |
```bash | |
${{ steps.verify_log.outputs.content }} | |
``` | |
</p> | |
</details> | |
## 验证结果: | |
- 是否识别成功: ${{ contains(steps.verify_log.outputs.content,'WebFingerPrintMatch') }} | |
- name: Create Verified Label | |
if: contains(steps.verify_log.outputs.content,'WebFingerPrintMatch') | |
uses: actions-cool/issues-helper@v3 | |
with: | |
actions: 'add-labels' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
labels: 'Verified' | |
- name: Create Not Verified Comment | |
if: contains(steps.verify_log.outputs.content,'WebFingerPrintMatch') == 'false' | |
uses: actions-cool/issues-helper@v3 | |
with: | |
actions: 'create-comment' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
## 验证失败: | |
- 请在本地测试识别成功后重新修改当前Issue的Yaml内容。 | |
```bash | |
➜ ~ ./observer_ward_amd64 --verify 0x727/FingerprintHub/fingerprint/swagger.yaml -t http://httpbin.org | |
``` | |
- name: Create Pending Review Comment | |
if: contains(steps.verify_log.outputs.content,'WebFingerPrintMatch') == 'true' | |
uses: actions-cool/issues-helper@v3 | |
with: | |
actions: 'create-comment' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
## 等待管理员审核: | |
- 指纹识别成功,请等待管理员审核,感谢提交。 |