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:
parent
ef9b7683d0
commit
09de08aec0
2 changed files with 77 additions and 6 deletions
69
.github/workflows/autofix.yaml
vendored
69
.github/workflows/autofix.yaml
vendored
|
@ -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
|
||||
|
|
14
.github/workflows/lint.yaml
vendored
14
.github/workflows/lint.yaml
vendored
|
@ -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 .
|
||||
|
|
Loading…
Reference in a new issue