(chore): GHA - Various (#1400)

pull/1412/head
bakerboy448 1 year ago committed by GitHub
parent e3e95d7369
commit fb6b49f986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,18 @@
name: Label Conflicts
on: [push, pull_request]
jobs:
triage:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Label Merge Conflicts
uses: mschilde/auto-label-merge-conflicts@master
with:
CONFLICT_LABEL_NAME: "Status: Conflicted"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_RETRIES: 5
WAIT_MS: 5000

@ -1,39 +1,49 @@
name: Build mkdocs and deploy to GitHub Pages name: Build and Deploy Docs
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
build: build:
name: Build docs name: Build docs
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3.5.3 - name: Checkout repository
- uses: actions/setup-python@v4.6.1 uses: actions/checkout@v3.5.3
- name: Set up Python
uses: actions/setup-python@v4.6.1
with: with:
python-version: 3.x python-version: 3.x
- uses: actions/cache@v3.3.1 - name: Cache dependencies
uses: actions/cache@v3.3.1
with: with:
key: ${{ github.ref }}
path: .cache path: .cache
- run: pip install -r docs/requirements.txt key: ${{ runner.os }}-build-${{ hashFiles('docs/requirements.txt') }}
- run: mkdocs build - name: Install dependencies
run: pip install -r docs/requirements.txt
- name: Build documentation
run: mkdocs build
deploy: deploy:
if: github.event_name == 'push' && contains(fromJson('["refs/heads/master", "refs/heads/main"]'), github.ref) if: github.event_name == 'push' && contains(fromJson('["refs/heads/master", "refs/heads/main"]'), github.ref)
needs: build needs: build
name: Deploy docs name: Deploy docs
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: write
steps: steps:
- uses: actions/checkout@v3.5.3 - name: Checkout repository
uses: actions/checkout@v3.5.3
with: with:
fetch-depth: '0' fetch-depth: '0'
- uses: actions/setup-python@v4.6.1 - name: Set up Python
uses: actions/setup-python@v4.6.1
with: with:
python-version: 3.x python-version: 3.x
- uses: actions/cache@v3.3.1 - name: Cache dependencies
uses: actions/cache@v3.3.1
with: with:
key: ${{ github.ref }}
path: .cache path: .cache
- run: pip install -r docs/requirements.txt key: ${{ runner.os }}-build-${{ hashFiles('docs/requirements.txt') }}
- run: mkdocs gh-deploy --force - name: Install dependencies
run: pip install -r docs/requirements.txt
- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force

@ -1,7 +1,11 @@
name: "Pull Request Labeler" name: Label Pull Requests
on: on:
- pull_request_target - pull_request_target
inputs:
sync-labels: true
jobs: jobs:
triage: triage:
permissions: permissions:

@ -0,0 +1,14 @@
name: Lint - EditorConfig
on: [push, pull_request]
jobs:
editorconfig-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: editorconfig-checker
run: |
docker run --rm \
-v "${GITHUB_WORKSPACE}":/check \
mstruebing/editorconfig-checker

@ -0,0 +1,26 @@
name: Lint - Markdown
on:
push:
paths:
- "**/*.md"
- ".markdownlint.jsonc"
pull_request:
paths:
- "**/*.md"
- ".markdownlint.jsonc"
jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: markdownlint
run: |
find "${GITHUB_WORKSPACE}" -name '*.md' -exec \
docker run --rm \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
-v "${GITHUB_WORKSPACE}/.markdownlint.jsonc":"/config/.markdownlint.jsonc" \
markdownlint/markdownlint \
-c "/config/.markdownlint.jsonc" \
{} +

@ -0,0 +1,26 @@
name: Lint - YAML
on:
push:
paths:
- "**/*.yml"
pull_request:
paths:
- "**/*.yml"
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: Run yamllint
run: |
find "${GITHUB_WORKSPACE}" -name '*.yml' -exec \
docker run --rm \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
-w "${GITHUB_WORKSPACE}" \
peterdavehello/yamllint \
yamllint -c yamllint.yml \
{} +

@ -1,41 +0,0 @@
name: Lint
on: [push, pull_request]
jobs:
editorconfig-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: editorconfig-checker
run: |
docker run --rm \
-v "${GITHUB_WORKSPACE}":/check \
mstruebing/editorconfig-checker
markdownlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: markdownlint
run: |
find "${GITHUB_WORKSPACE}" -name '*.md' -exec \
docker run --rm \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
markdownlint/markdownlint \
-r ~MD013,~MD033,~MD034,~MD046,~MD002,~MD041 \
{} +
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: yamllint
run: |
find "${GITHUB_WORKSPACE}" -name '*.yaml' -o -name '*.yml' -exec \
docker run --rm \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" \
peterdavehello/yamllint \
yamllint -d '{"extends":"default","rules":{"document-start":{"present":false},"line-length":"disable","truthy":{"check-keys":false}}}' \
{} +

@ -20,6 +20,6 @@ jobs:
- uses: actions/checkout@v3.5.3 - uses: actions/checkout@v3.5.3
- uses: actions/setup-python@v4.6.1 - uses: actions/setup-python@v4.6.1
with: with:
python-version: "3.x" python-version: 3.x
- run: pip install jsonschema - run: pip install jsonschema
- run: jsonschema -i metadata.json metadata.schema.json - run: jsonschema -i metadata.json metadata.schema.json

@ -0,0 +1,7 @@
extends: default
rules:
document-start:
present: false
line-length: disable
truthy:
check-keys: false
Loading…
Cancel
Save