mirror of
https://github.com/coder/coder.git
synced 2026-06-04 13:38:21 +00:00
57a65c15bf
Use specific commit SHAs for GitHub actions across various workflows to enhance reliability and reproducibility. This change ensures that actions run against a known version, reducing the risk of unexpected issues due to updates in the third-party action repositories. This contributes to improving the score in #14879
38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
name: weekly-docs
|
|
# runs every monday at 9 am
|
|
on:
|
|
schedule:
|
|
- cron: "0 9 * * 1"
|
|
workflow_dispatch: # allows to run manually for testing
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "docs/**"
|
|
|
|
jobs:
|
|
check-docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
|
|
- name: Check Markdown links
|
|
uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # v1.0.15
|
|
id: markdown-link-check
|
|
# checks all markdown files from /docs including all subfolders
|
|
with:
|
|
use-quiet-mode: "yes"
|
|
use-verbose-mode: "yes"
|
|
config-file: ".github/workflows/mlc_config.json"
|
|
folder-path: "docs/"
|
|
file-path: "./README.md"
|
|
|
|
- name: Send Slack notification
|
|
if: failure() && github.event_name == 'schedule'
|
|
run: |
|
|
curl -X POST -H 'Content-type: application/json' -d '{"msg":"Broken links found in the documentation. Please check the logs at ${{ env.LOGS_URL }}"}' ${{ secrets.DOCS_LINK_SLACK_WEBHOOK }}
|
|
echo "Sent Slack notification"
|
|
env:
|
|
LOGS_URL: https://github.com/coder/coder/actions/runs/${{ github.run_id }}
|