mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-28 11:20:30 +00:00
31 lines
970 B
YAML
31 lines
970 B
YAML
when:
|
|
- event: cron
|
|
cron: links
|
|
|
|
steps:
|
|
- name: links
|
|
image: docker.io/lycheeverse/lychee:0.15.1
|
|
failure: ignore
|
|
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/alpine:3.21
|
|
depends_on: links
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
commands:
|
|
- apk add -q --no-cache jq curl
|
|
- export ISSUE_NUMBER=4514
|
|
- export DESCRIPTION=$(cat links.md)
|
|
- |
|
|
curl -X PATCH \
|
|
-H "Authorization: token $GITHUB_TOKEN" \
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
https://api.github.com/repos/${CI_REPO}/issues/$ISSUE_NUMBER \
|
|
-d "$(jq -n --arg body "$DESCRIPTION" '{body: $body}')"
|