2024-12-08 12:20:24 +00:00
|
|
|
when:
|
|
|
|
- event: cron
|
|
|
|
cron: links
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: links
|
|
|
|
image: docker.io/lycheeverse/lychee:0.15.1
|
2024-12-08 14:07:34 +00:00
|
|
|
failure: ignore
|
2024-12-08 12:20:24 +00:00
|
|
|
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
|
2024-12-08 21:12:58 +00:00
|
|
|
image: docker.io/alpine:3.21
|
2024-12-08 12:45:03 +00:00
|
|
|
depends_on: links
|
2024-12-08 12:20:24 +00:00
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
commands:
|
2024-12-08 21:12:58 +00:00
|
|
|
- apk add -q --no-cache jq curl
|
2024-12-08 14:16:09 +00:00
|
|
|
- export ISSUE_NUMBER=4514
|
|
|
|
- export DESCRIPTION=$(cat links.md)
|
2024-12-08 12:20:24 +00:00
|
|
|
- |
|
|
|
|
curl -X PATCH \
|
2024-12-08 14:16:09 +00:00
|
|
|
-H "Authorization: token $GITHUB_TOKEN" \
|
2024-12-08 12:20:24 +00:00
|
|
|
-H "Accept: application/vnd.github.v3+json" \
|
2024-12-08 14:16:09 +00:00
|
|
|
https://api.github.com/repos/${CI_REPO}/issues/${ISSUE_NUMBER} \
|
2024-12-08 12:20:24 +00:00
|
|
|
-d "$(jq -n --arg body "$DESCRIPTION" '{body: $body}')"
|