Skip to content

CASMCMS-8793: Update CFS import tool to add support for CFS sources #5536

CASMCMS-8793: Update CFS import tool to add support for CFS sources

CASMCMS-8793: Update CFS import tool to add support for CFS sources #5536

Workflow file for this run

#
# MIT License
#
# (C) Copyright 2022-2024 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
name: Markdown linkcheck
on:
pull_request:
workflow_dispatch:
inputs:
force_full_scan:
description: 'Enforce link checking on all files'
required: false
type: boolean
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: "**/*.md"
files_ignore: |
.github/**/*
api/*
# Newer versions of markdown-link-checker do not work with anchors - https://github.com/tcort/markdown-link-check/issues/225
- name: Check links in changed files
uses: docker://ghcr.io/tcort/markdown-link-check:3.9.3
if: ${{ steps.changed-files.outputs.deleted_files == '' && steps.changed-files.outputs.renamed_files == '' }}
with:
args: "--config .github/config/markdown_link.json ${{ steps.changed-files.outputs.all_changed_files }}"
# In case if any files were renamed or deleted, other files may still have references - need a full scan
- name: Full scan
uses: docker://ghcr.io/tcort/markdown-link-check:3.9.3
if: ${{ steps.changed-files.outputs.deleted_files != '' || steps.changed-files.outputs.renamed_files != '' || inputs.force_full_scan }}
with:
entrypoint: find
args: -name "*.md" -not -path "./.github/*" -exec sh -c "set -o pipefail; markdown-link-check --config .github/config/markdown_link.json {} 2>&1 | tee output.txt || cat output.txt >> error.txt" ";"
- name: Report errors
if: ${{ steps.changed-files.outputs.deleted_files != '' || steps.changed-files.outputs.renamed_files != '' || inputs.force_full_scan }}
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
if (fs.existsSync('error.txt')) {
fs.readFile('error.txt', 'utf8', (err, data) => {
console.log(data);
});
core.setFailed('Unsatisfied links found')
}