added description #30
Workflow file for this run
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: Validate authors | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: "${{ github.event.pull_request.head.sha }}" | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
authors: | |
- '_data/authors.yml' | |
- name: Get all changed files | |
if: steps.filter.outputs.authors == 'true' | |
id: files | |
uses: Ana06/get-changed-files@v2.1.0 | |
- uses: actions/setup-python@v2 | |
if: steps.filter.outputs.authors == 'true' | |
with: | |
python-version: '3.x' | |
- name: Install python dependencies | |
if: steps.filter.outputs.authors == 'true' | |
run: | | |
pip install PyYAML python-frontmatter requests | |
- name: Get validation script from main branch | |
if: steps.filter.outputs.authors == 'true' | |
run: | | |
rm -rf _scripts | |
wget https://raw.githubusercontent.com/genicsblog/theme-files/main/_scripts/validate-authors.py -P _scripts | |
- name: Validate authors | |
if: steps.filter.outputs.authors == 'true' | |
run: | | |
echo "${{ steps.files.outputs.all }}" >> temp.txt | |
python _scripts/validate-authors.py ${{ github.event.pull_request.user.login }} | |
rm temp.txt |