From 8c52f59c23d43473786aa30fd881ee2dddcb6e64 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Sun, 27 Sep 2020 21:40:56 +0500 Subject: [PATCH 1/4] Add json & md linting with github/super-linter --- .github/workflows/linter.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..376b5f25 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,27 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + pull_request: + branches: [main] + +jobs: + build: + name: Lint JSON & MD files + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Lint Code Base + uses: github/super-linter@v3 + env: + VALIDATE_ALL_CODEBASE: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_JSON: true + VALIDATE_MD: true + DEFAULT_BRANCH: main From 0cc7e14e5ea615c1f1be8dac1f927b9b314f492c Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Mon, 28 Sep 2020 12:36:43 +0500 Subject: [PATCH 2/4] Change descriptive comment --- .github/workflows/linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 376b5f25..ea1eb785 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,4 +1,4 @@ -# This is a basic workflow to help you get started with Actions +# CI Validation name: CI From f102789f9fb69a9ae8e0f589aed7c3944cc4a394 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Mon, 28 Sep 2020 12:37:31 +0500 Subject: [PATCH 3/4] remove redundant comments --- .github/workflows/linter.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index ea1eb785..461611bb 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -2,8 +2,6 @@ name: CI -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch on: pull_request: branches: [main] From 258e8cd8177fcc559226192b40238c0134e7ffc5 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Mon, 28 Sep 2020 12:40:36 +0500 Subject: [PATCH 4/4] replace "main" with "$default-branch" --- .github/workflows/linter.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 461611bb..42eb7cad 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -4,7 +4,7 @@ name: CI on: pull_request: - branches: [main] + branches: [$default-branch] jobs: build: @@ -22,4 +22,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_JSON: true VALIDATE_MD: true - DEFAULT_BRANCH: main + DEFAULT_BRANCH: ${{ github.base_ref }}