1
0
Fork 0
mirror of https://github.com/kdeldycke/awesome-falsehood.git synced 2024-11-27 11:44:39 -05:00

Auto fix images and JSON. Lint YAML.

This commit is contained in:
Kevin Deldycke 2020-10-23 10:07:36 +02:00
parent ef9b7683d0
commit 09de08aec0
No known key found for this signature in database
GPG key ID: C572BB01B1ED5A3A
2 changed files with 77 additions and 6 deletions

View file

@ -37,6 +37,33 @@ jobs:
commit_message: "[lint] Update TOC."
file_pattern: readme.md
json:
name: Format JSON files and create a PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- name: Install linter
run: |
sudo npm install jsonlint -g
- name: Lint
run: >
find ./ -type f -name '*.json' -print -exec
jsonlint --in-place "{}" \;
- uses: peter-evans/create-pull-request@v3
with:
author: "Kevin Deldycke <kevin@deldycke.com>"
commit-message: "[autofix] Format JSON content"
title: "[autofix] Format JSON content"
body: >
[Auto-generated on run
#${{ github.run_id }}](https://github.com/${{ github.repository
}}/actions/runs/${{ github.run_id }}) as defined by [workflow
action](https://github.com/${{ github.repository
}}/blob/${{ github.base_ref }}/.github/workflows/autofix.yaml).
labels: CI/CD
assignees: kdeldycke
branch: format-json
typos:
name: Fix typos and create a PR
runs-on: ubuntu-latest
@ -46,11 +73,41 @@ jobs:
- uses: peter-evans/create-pull-request@v3
with:
author: "Kevin Deldycke <kevin@deldycke.com>"
commit-message: "Fix typo."
title: "Typo"
commit-message: "[autofix] Typo"
title: "[autofix] Typo"
body: >
[Auto-generated on run #${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
as defined by [workflow action](https://github.com/${{ github.repository }}/blob/develop/.github/workflows/autofix.yaml).
labels: "typo"
[Auto-generated on run
#${{ github.run_id }}](https://github.com/${{ github.repository
}}/actions/runs/${{ github.run_id }}) as defined by [workflow
action](https://github.com/${{ github.repository
}}/blob/${{ github.base_ref }}/.github/workflows/autofix.yaml).
labels: CI/CD, documentation
assignees: kdeldycke
branch: fix-typo
branch: autofix-typo
images:
name: Optimize images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: calibreapp/image-actions@1.1.0
id: image_actions
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true
- uses: peter-evans/create-pull-request@v3
with:
author: "Kevin Deldycke <kevin@deldycke.com>"
commit-message: "[autofix] Optimize images"
title: "[autofix] Optimize images"
body: >
[Auto-generated on run
#${{ github.run_id }}](https://github.com/${{ github.repository
}}/actions/runs/${{ github.run_id }}) as defined by [workflow
action](https://github.com/${{ github.repository
}}/blob/${{ github.base_ref }}/.github/workflows/autofix.yaml).
%0A
${{ steps.image_actions.outputs.markdown }}
labels: CI/CD, documentation
assignees: kdeldycke
branch: optimize-images

View file

@ -29,3 +29,17 @@ jobs:
- run: |
npx awesome-lint --version
npx awesome-lint
lint-yaml:
name: Lint YAML files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/setup-python@v2.1.4
- name: Install linter
run: |
python -m pip install --upgrade pip
python -m pip install yamllint
- name: Lint
run: |
yamllint .