update github workflows #10
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 filenames & JSON informations | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
validation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt install imagemagick-6.q16 | |
- name: Collecting file paths | |
run: | | |
echo "FILE_PATHS=$(find ./guilds -type f -name '*info.json' -printf '%p,'| sed 's/,$//' )" >> $GITHUB_ENV | |
- id: files | |
uses: jitterbit/get-changed-files@v1 | |
- name: Validate file size | |
run: | | |
source .github/snippet.sh ; validate_file_size ${{ steps.files.outputs.added_modified }} | |
- name: Validate filenames | |
run: | | |
source .github/snippet.sh ; validate_filenames ${{ steps.files.outputs.added_modified }} | |
- name: Validate png dimensions | |
run: | | |
source .github/snippet.sh ; validate_png_dimensions ${{ steps.files.outputs.added_modified }} | |
- name: Validate svg square | |
run: | | |
source .github/snippet.sh ; validate_svg_square ${{ steps.files.outputs.added_modified }} | |
- name: Validate JSON | |
uses: docker://orrosenblatt/validate-json-action:latest | |
env: | |
INPUT_SCHEMA: ./schema.json | |
INPUT_JSONS: ${{ env.FILE_PATHS }} |