-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (38 loc) · 1.05 KB
/
link-checker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# .github/workflows/issue-on-push.yml
on:
workflow_dispatch:
schedule:
- cron: 0 0 */14 * *
name: check friend links && create an issue
permissions:
contents: read
issues: write
jobs:
check:
runs-on: ubuntu-latest
outputs:
output: ${{ steps.run.outputs.log }}
steps:
- name: "checkout"
uses: actions/checkout@v3
- name: "run-script"
id: "run"
run: |
pip install -r checker/requirements.txt
echo 'log<<EOF' >> $GITHUB_OUTPUT
python checker/main.py >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
issue:
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v3
- uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHECKER_LOGS: ${{needs.check.outputs.output}}
with:
filename: .github/ISSUE_TEMPLATE/友链检查器.md
- uses: OSDKDev/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"