File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Links
2+
3+ on :
4+ repository_dispatch :
5+ workflow_dispatch :
6+ pull_request :
7+ schedule :
8+ - cron : " 00 18 * * *"
9+
10+ jobs :
11+ check-links :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ issues : write # required for peter-evans/create-issue-from-file
15+ steps :
16+ - uses : actions/checkout@v5
17+
18+ - name : Link Checker
19+ id : lychee
20+ uses : lycheeverse/lychee-action@v2
21+ with :
22+ args : . --exclude-path "tests"
23+ fail : false
24+
25+ - name : Broken Links Report
26+ if : steps.lychee.outputs.exit_code != 0 && github.event_name == 'schedule'
27+ uses : actions/github-script@v8
28+ with :
29+ script : |
30+ const fs = require('fs');
31+
32+ // Read the markdown file
33+ // Ensure the path is correct relative to the workspace root
34+ const reportBody = fs.readFileSync('./lychee/out.md', 'utf8');
35+
36+ await github.rest.issues.create({
37+ owner: context.repo.owner,
38+ repo: context.repo.repo,
39+ title: 'Broken Links Report',
40+ body: reportBody
41+ });'
Original file line number Diff line number Diff line change 11[ ![ GitHub Workflow Status] ( https://img.shields.io/github/actions/workflow/status/commitizen-tools/commitizen/pythonpackage.yml?label=python%20package&logo=github&logoColor=white&style=flat-square )] ( https://github.com/commitizen-tools/commitizen/actions )
2+ [ ![ Check Links] ( https://github.com/commitizen-tools/commitizen/actions/workflows/links.yml/badge.svg )] ( https://github.com/commitizen-tools/commitizen/actions/workflows/links.yml )
23[ ![ Conventional Commits] ( https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square )] ( https://conventionalcommits.org )
34[ ![ PyPI Package latest release] ( https://img.shields.io/pypi/v/commitizen.svg?style=flat-square )] ( https://pypi.org/project/commitizen/ )
45[ ![ PyPI Package download count (per month)] ( https://img.shields.io/pypi/dm/commitizen?style=flat-square )] ( https://pypi.org/project/commitizen/ )
You can’t perform that action at this time.
0 commit comments