mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-15 21:16:32 +00:00
Move link checks into cron-curated issue dashboard (#4515)
This commit is contained in:
parent
d0e4a176f1
commit
8773e6c683
2 changed files with 30 additions and 8 deletions
30
.woodpecker/links.yaml
Normal file
30
.woodpecker/links.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
when:
|
||||
- event: cron
|
||||
cron: links
|
||||
|
||||
steps:
|
||||
- name: links
|
||||
image: docker.io/lycheeverse/lychee:0.15.1
|
||||
depends_on: []
|
||||
commands:
|
||||
- lychee pipeline/frontend/yaml/linter/schema/schema.json > links.md
|
||||
- lychee --exclude localhost docs/docs/ >> links.md
|
||||
- lychee --exclude localhost docs/src/pages/ >> links.md
|
||||
- echo -e "\nLast checked:$(date)" >> links.md
|
||||
|
||||
- name: Update issue
|
||||
image: docker.io/curlimages/curl:8.10.1
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
commands:
|
||||
- ISSUE_NUMBER=4514
|
||||
- REPO_OWNER=woodpecker-ci
|
||||
- REPO_NAME=woodpecker
|
||||
- DESCRIPTION=$(cat links.md)
|
||||
- |
|
||||
curl -X PATCH \
|
||||
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/issues/${ISSUE_NUMBER} \
|
||||
-d "$(jq -n --arg body "$DESCRIPTION" '{body: $body}')"
|
|
@ -23,11 +23,3 @@ steps:
|
|||
depends_on: []
|
||||
settings:
|
||||
version: 3.3.3
|
||||
|
||||
- name: links
|
||||
image: docker.io/lycheeverse/lychee:0.15.1
|
||||
depends_on: []
|
||||
commands:
|
||||
- lychee pipeline/frontend/yaml/linter/schema/schema.json
|
||||
- lychee --user-agent "curl/8.4.0" --exclude localhost docs/docs/
|
||||
- lychee --user-agent "curl/8.4.0" --exclude localhost docs/src/pages/
|
||||
|
|
Loading…
Reference in a new issue