Skip to content

Commit

Permalink
ci: sync yml linting from mdn/content (#8218)
Browse files Browse the repository at this point in the history
Co-authored-by: Claas Augner <[email protected]>
  • Loading branch information
nschonni and caugner authored Oct 20, 2022
1 parent fb65f93 commit 4fdea49
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 13 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/page-report-fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@ body:
attributes:
label: MDN metadata
description: Set automatically. Do not modify.

2 changes: 1 addition & 1 deletion .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
paths:
- '*.md'
- "*.md"
- .github/workflows/markdown-lint.yml
- .markdownlint.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-check_redirects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "16"
cache: 'yarn'
cache: "yarn"
cache-dependency-path: mdn/content/yarn.lock

- name: Install all yarn packages
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pr-check_yml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint YAML

on:
pull_request:
branches:
- main
paths:
- yarn.lock
- "**/*.yml"
- .github/workflows/pr-check_yml.yml

jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16"
cache: yarn

- name: Install all yarn packages
run: yarn --frozen-lockfile

- name: Lint markdown files
run: yarn lint:yml
6 changes: 3 additions & 3 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/pr-review-companion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: 'Download artifact'
- name: "Download artifact"
uses: actions/github-script@v6
with:
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "16"
cache: 'yarn'
cache: "yarn"
cache-dependency-path: mdn/content/yarn.lock

- name: Install all yarn packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-translated-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "16"
cache: 'yarn'
cache: "yarn"
cache-dependency-path: mdn/content/yarn.lock

- name: Install all yarn packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/system-file-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ name: System file changes
on:
pull_request_target:
paths:
- '.github/workflows/**'
- '.github/CODEOWNERS'
- ".github/workflows/**"
- ".github/CODEOWNERS"

jobs:
block:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ _githistory.json
.DS_Store
.idea
mdn/content
yarn-debug.log*
yarn-error.log*
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
"url": "git+https://github.com/mdn/translated-content.git"
},
"scripts": {
},
"devDependencies": {
"fix:yml": "prettier -w \"**/*.yml\"",
"lint:yml": "prettier -c \"**/*.yml\""
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
},
"dependencies": {
"prettier": "2.7.1"
}
}
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


[email protected]:
version "2.7.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==

0 comments on commit 4fdea49

Please sign in to comment.