Merge pull request #11 from psychic-spoon/patch-1 #8
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: commit policy removing comments | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'aws-iam-policies/docs/*-doc-*.json5' | |
jobs: | |
testJob: | |
name: Remove Comments | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- run: | |
pip install json5 | |
- run: python3 main.py ${{ steps.modifieddocfiles.outputs.added_modified }} | |
- name: commit files | |
run: | | |
git status | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git diff-index --quiet HEAD || (git commit -a -m "Remove comments and commit json file" --allow-empty) | |
git push -f | |