Skip to content

updated jenkins.md

updated jenkins.md #23

Workflow file for this run

#
# Author: Hari Sekhon
# Date: 2024-02-27 18:45:11 +0000 (Tue, 27 Feb 2024)
#
# vim:ts=2:sts=2:sw=2:et
#
# https://github.com/HariSekhon/Docs
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# I n d e x
# ============================================================================ #
# Check all .md files are referenced in the README.md index
---
name: Index
on:
push:
branches:
- master
- main
paths:
- '**/*.md'
- .github/workflows/index.yaml
pull_request:
branches:
- master
- main
paths:
- '**/*.md'
- .github/workflows/index.yaml
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
defaults:
run:
shell: bash -euxo pipefail {0}
jobs:
index-check:
# github.event.repository context not available in scheduled workflows
#if: github.event.repository.fork == false
if: github.repository_owner == 'HariSekhon'
name: Index Check
timeout-minutes: 3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
#name: Git Checkout # better to show the action@version
- name: Check all *.md are in the README.md
run: |
exitcode=0
for file_md in *.md; do
[ "$file_md" = README.md ] && continue
if ! grep -q "$file_md" README.md; then
echo "$file_md not in README.md"
exitcode=1
fi
done
exit $exitcode