csv-to-md #2893
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: Run csv-to-md.py | |
run-name: csv-to-md | |
on: | |
push: | |
paths: | |
- "*.csv" | |
jobs: | |
Run-CSV-To-MD_PY: | |
runs-on: ubuntu-latest | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- run: python csv-to-md.py | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
# Enable listing of files matching each filter. | |
# Paths to files will be available in `${FILTER_NAME}_files` output variable. | |
# Paths will be escaped and space-delimited. | |
# Output is usable as command-line argument list in Linux shell | |
list-files: shell | |
# In this example changed files will be checked by linter. | |
# It doesn't make sense to lint deleted files. | |
# Therefore we specify we are only interested in added or modified files. | |
filters: | | |
markdown: | |
- added|modified: '*.md' | |
- name: Lint Markdown | |
if: ${{ steps.filter.outputs.markdown == 'true' }} | |
run: | | |
sed -i "0,/last_modified_at.*/s//last_modified_at: $(date -Iseconds)/" ${{ steps.filter.outputs.markdown_files }} | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
# Optional. Commit message for the created commit. | |
# Defaults to "Apply automatic changes" | |
commit_user_name: git-auto-commit-action |