Merge pull request #105 from andreasscherbaum/Joe_Conway #298
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: Verify Pull Requests | |
# Run this workflow every time a new commit pushed to the repository | |
on: | |
push: | |
branches: ['*'] | |
#branches-ignore: 'main' | |
pull_request: | |
branches: ['*'] | |
#branches-ignore: 'main' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
pr-test: | |
name: Verify data | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout data | |
uses: actions/checkout@v3 | |
- name: Calculate working directory | |
run: echo "PWD=$(realpath ./$EXTENSION_SUBDIRECTORY)" >>$GITHUB_OUTPUT | |
id: pwd | |
- name: Working directory | |
run: echo "${{ steps.pwd.outputs.PWD }}" | |
- name: Verify JSON | |
run: jq -e "." < postgresfriends.json > /dev/null | |
- name: Verify postgresfriends.json data integrity | |
run: ./bin/verify-data.py < postgresfriends.json > /dev/null | |
- name: Find 'Mastadon' in file | |
run: echo "COUNT=$(grep -c 'Mastadon' postgresfriends.json)" >>$GITHUB_OUTPUT | |
id: mastadon_count | |
- name: Show 'Mastadon' word count | |
run: echo "${{ steps.mastadon_count.outputs.COUNT }}" | |
- name: Break if word 'Mastadon' is found | |
run: exit 1 | |
if: steps.mastadon_count.outputs.COUNT != '0' |