docs(ghactions, syntax fixes): multiline string to output (#33) #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Markdown Lint | |
on: | |
push: | |
branches: | |
- "main" # run when push happens on all branches | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Get file changes | |
id: get_file_changes | |
uses: trilom/file-changes-action@v1.2.4 | |
with: | |
output: ' ' | |
- name: Echo changed files | |
run: | | |
echo Changed files: ${{ steps.get_file_changes.outputs.files }} | |
- name: Get only md files | |
id: get_md_changes | |
run: | | |
echo -e "::set-output name=files::\c";echo "${{ steps.get_file_changes.outputs.files }}" | for i in $(cat) ; do if [[ $i == *.md ]]; then echo -e "$i \c"; fi ;done | |
- name: markdownlint-cli | |
if: ${{ steps.get_md_changes.outputs.files}} | |
uses: nosborn/github-action-markdown-cli@v3.2.0 | |
with: | |
files: ${{ steps.get_md_changes.outputs.files}} | |
config_file: ".markdownlint" |