From 707ac3b6079639e5568cf0ba0759208bcdd82576 Mon Sep 17 00:00:00 2001 From: Asartea <76259120+Asartea@users.noreply.github.com> Date: Sun, 21 Jul 2024 09:08:17 +0200 Subject: [PATCH 1/2] Feat: split Markdownlint jobs --- .github/workflows/markdownlint-lessons.yml | 34 ++++++++++++++ .github/workflows/markdownlint-projects.yml | 32 ++++++++++++++ .github/workflows/markdownlint.yml | 49 --------------------- 3 files changed, 66 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/markdownlint-lessons.yml create mode 100644 .github/workflows/markdownlint-projects.yml delete mode 100644 .github/workflows/markdownlint.yml diff --git a/.github/workflows/markdownlint-lessons.yml b/.github/workflows/markdownlint-lessons.yml new file mode 100644 index 00000000000..b95c643b07b --- /dev/null +++ b/.github/workflows/markdownlint-lessons.yml @@ -0,0 +1,34 @@ +name: MarkdownLint +on: + pull_request: + paths: + - '**.md' + - '!./*.md' + - '!**/project*.md' + - '!./archive/**.md' + - '!./templates/**.md' + - '!./markdownlint/docs/**.md' + +jobs: + lesson_lint: + name: Lint lesson files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: tj-actions/changed-files@v41 + id: changed-files + with: + files: | + **.md + !./*.md + !README.md + !**/project*.md + !./archive/**.md + !./templates/**.md + !./markdownlint/docs/**.md + separator: ',' + - uses: DavidAnson/markdownlint-cli2-action@v14 + with: + config: './lesson.markdownlint-cli2.jsonc' + globs: ${{ steps.changed-files.outputs.all_changed_files }} + separator: ',' diff --git a/.github/workflows/markdownlint-projects.yml b/.github/workflows/markdownlint-projects.yml new file mode 100644 index 00000000000..2c8f4f2ce50 --- /dev/null +++ b/.github/workflows/markdownlint-projects.yml @@ -0,0 +1,32 @@ +name: MarkDownLint +on: + pull_request: + paths: + - '**/project*.md' + - '!./*.md' + - '!./archive/**.md' + - '!./templates/**.md' + - '!./markdownlint/docs/**.md' + +jobs: + project_lint: + name: Lint project files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: tj-actions/changed-files@v41 + id: changed-files + with: + files: | + **/project*.md + !./*.md + !README.md + !./archive/**.md + !./templates/**.md + !./markdownlint/docs/**.md + separator: ',' + - uses: DavidAnson/markdownlint-cli2-action@v14 + with: + config: './project.markdownlint-cli2.jsonc' + globs: ${{ steps.changed-files.outputs.all_changed_files }} + separator: ',' diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml deleted file mode 100644 index e95a2e2c860..00000000000 --- a/.github/workflows/markdownlint.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: MarkdownLint -on: pull_request - -jobs: - project_lint: - name: Lint project files - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: tj-actions/changed-files@v41 - id: changed-files - with: - files: | - **/project*.md - !./*.md - !README.md - !./archive/**.md - !./templates/**.md - !./markdownlint/docs/**.md - separator: ',' - - uses: DavidAnson/markdownlint-cli2-action@v14 - if: steps.changed-files.outputs.any_changed == 'true' - with: - config: './project.markdownlint-cli2.jsonc' - globs: ${{ steps.changed-files.outputs.all_changed_files }} - separator: ',' - lesson_lint: - name: Lint lesson files - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: tj-actions/changed-files@v41 - id: changed-files - with: - files: | - **.md - !./*.md - !README.md - !**/project*.md - !./archive/**.md - !./templates/**.md - !./markdownlint/docs/**.md - separator: ',' - - uses: DavidAnson/markdownlint-cli2-action@v14 - if: steps.changed-files.outputs.any_changed == 'true' - with: - config: './lesson.markdownlint-cli2.jsonc' - globs: ${{ steps.changed-files.outputs.all_changed_files }} - separator: ',' From 0eac24166c2193267b75ed39c902f2139bcbb9d6 Mon Sep 17 00:00:00 2001 From: Asartea <76259120+Asartea@users.noreply.github.com> Date: Sun, 21 Jul 2024 13:39:38 +0200 Subject: [PATCH 2/2] Also bump action/checkout --- .github/workflows/markdownlint-lessons.yml | 2 +- .github/workflows/markdownlint-projects.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/markdownlint-lessons.yml b/.github/workflows/markdownlint-lessons.yml index b95c643b07b..604e456d619 100644 --- a/.github/workflows/markdownlint-lessons.yml +++ b/.github/workflows/markdownlint-lessons.yml @@ -14,7 +14,7 @@ jobs: name: Lint lesson files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: tj-actions/changed-files@v41 id: changed-files with: diff --git a/.github/workflows/markdownlint-projects.yml b/.github/workflows/markdownlint-projects.yml index 2c8f4f2ce50..6093ca8e69d 100644 --- a/.github/workflows/markdownlint-projects.yml +++ b/.github/workflows/markdownlint-projects.yml @@ -13,7 +13,7 @@ jobs: name: Lint project files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: tj-actions/changed-files@v41 id: changed-files with: