Use latest external workflow.
This commit is contained in:
86
.github/workflows/autofix.yaml
vendored
86
.github/workflows/autofix.yaml
vendored
@@ -2,88 +2,12 @@
|
||||
name: Autofix
|
||||
"on":
|
||||
push:
|
||||
# Only targets default branch to avoid amplification effects of
|
||||
# auto-fixing the exact same stuff in multiple non-rebased branches.
|
||||
# Only targets main branch to avoid amplification effects of auto-fixing
|
||||
# the exact same stuff in multiple non-rebased branches.
|
||||
branches:
|
||||
- 'main'
|
||||
schedule:
|
||||
# Run linter every week to catch regressions from external dependencies.
|
||||
- cron: 17 9 * * 1
|
||||
- main
|
||||
|
||||
jobs:
|
||||
|
||||
markdown:
|
||||
name: Format markdown, update TOC and create a PR
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install doctoc
|
||||
run: |
|
||||
sudo npm install -g doctoc
|
||||
- name: Generate full TOC
|
||||
run: |
|
||||
doctoc --github readme.md
|
||||
- name: Remove forbidden special TOC entries
|
||||
# See: https://github.com/sindresorhus/awesome-lint/blob/v0.16.0/rules
|
||||
# /toc.js#L15-L18
|
||||
run: >
|
||||
gawk -i inplace '!/^- \[(Contributing|Footnotes)\]\(#.+\)$/{print}'
|
||||
./readme.md
|
||||
- name: Install Pandoc
|
||||
run: |
|
||||
sudo apt install pandoc
|
||||
- name: Auto-format to GitHub-Flavored Markdown
|
||||
run: >
|
||||
pandoc ./readme.md --from=gfm --to=gfm --output=./readme.md
|
||||
--columns=79 --wrap=none --tab-stop=2
|
||||
- name: Auto-fix Markdown
|
||||
uses: avto-dev/markdown-lint@v1.5.0
|
||||
# Non-fixable markdown issues will return non-zero error code. Allow
|
||||
# that step to fail so we can proceed with creating the auto-fix PR
|
||||
# below.
|
||||
continue-on-error: true
|
||||
with:
|
||||
config: '.github/markdown-lint.yaml'
|
||||
args: './**/*.md'
|
||||
fix: true
|
||||
- uses: peter-evans/create-pull-request@v3.12.0
|
||||
with:
|
||||
author: "Kevin Deldycke <kevin@deldycke.com>"
|
||||
commit-message: "[autofix] Format Markdown"
|
||||
title: "[autofix] Format Markdown"
|
||||
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-markdown
|
||||
|
||||
json:
|
||||
name: Format JSON files and create a PR
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- 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.12.0
|
||||
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
|
||||
autofix:
|
||||
uses: kdeldycke/workflows/.github/workflows/autofix.yaml@v1.0.0
|
||||
2
.github/workflows/autolock.yaml
vendored
2
.github/workflows/autolock.yaml
vendored
@@ -8,4 +8,4 @@ name: Autolock
|
||||
jobs:
|
||||
|
||||
autolock:
|
||||
uses: kdeldycke/workflows/.github/workflows/autolock.yaml@v0.9.1
|
||||
uses: kdeldycke/workflows/.github/workflows/autolock.yaml@v1.0.0
|
||||
|
||||
2
.github/workflows/label-sponsors.yaml
vendored
2
.github/workflows/label-sponsors.yaml
vendored
@@ -11,4 +11,4 @@ name: Label sponsors
|
||||
jobs:
|
||||
|
||||
label-sponsors:
|
||||
uses: kdeldycke/workflows/.github/workflows/label-sponsors.yaml@v0.9.1
|
||||
uses: kdeldycke/workflows/.github/workflows/label-sponsors.yaml@v1.0.0
|
||||
2
.github/workflows/labels.yaml
vendored
2
.github/workflows/labels.yaml
vendored
@@ -8,7 +8,7 @@ name: Labels
|
||||
jobs:
|
||||
|
||||
labels:
|
||||
uses: kdeldycke/workflows/.github/workflows/labels.yaml@v0.9.1
|
||||
uses: kdeldycke/workflows/.github/workflows/labels.yaml@v1.0.0
|
||||
with:
|
||||
extra-label-files: |
|
||||
.github/labels-extra.json
|
||||
24
.github/workflows/lint.yaml
vendored
24
.github/workflows/lint.yaml
vendored
@@ -6,26 +6,4 @@ name: Lint
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
uses: kdeldycke/workflows/.github/workflows/lint.yaml@v0.9.1
|
||||
|
||||
lint-markdown:
|
||||
name: Lint markdown
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: avto-dev/markdown-lint@v1.5.0
|
||||
with:
|
||||
config: '.github/markdown-lint.yaml'
|
||||
args: './**/*.md'
|
||||
|
||||
lint-awesome:
|
||||
name: Lint Awesome list
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
# Fetch all history to please linter's age checks.
|
||||
fetch-depth: 0
|
||||
- run: |
|
||||
npx awesome-lint --version
|
||||
npx awesome-lint
|
||||
uses: kdeldycke/workflows/.github/workflows/lint.yaml@v1.0.0
|
||||
Reference in New Issue
Block a user