diff --git a/ci/dhis2-verify-app.yml b/ci/dhis2-verify-app.yml index 52dd542..657e8df 100644 --- a/ci/dhis2-verify-app.yml +++ b/ci/dhis2-verify-app.yml @@ -64,6 +64,20 @@ jobs: - name: Lint run: yarn d2-style check + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: c-hive/gha-yarn-cache@v1 + - run: yarn install --frozen-lockfile + - id: commitlint + run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") + - uses: wagoid/commitlint-github-action@v4 + with: + configFile: ${{ steps.commitlint.outputs.config_path }} + test: runs-on: ubuntu-latest steps: diff --git a/ci/dhis2-verify-lib.yml b/ci/dhis2-verify-lib.yml index b623a54..91ab7ce 100644 --- a/ci/dhis2-verify-lib.yml +++ b/ci/dhis2-verify-lib.yml @@ -55,6 +55,20 @@ jobs: - name: Lint run: yarn d2-style check + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: c-hive/gha-yarn-cache@v1 + - run: yarn install --frozen-lockfile + - id: commitlint + run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") + - uses: wagoid/commitlint-github-action@v4 + with: + configFile: ${{ steps.commitlint.outputs.config_path }} + test: runs-on: ubuntu-latest needs: [build] diff --git a/ci/dhis2-verify-node.yml b/ci/dhis2-verify-node.yml index abc99d5..d73f277 100644 --- a/ci/dhis2-verify-node.yml +++ b/ci/dhis2-verify-node.yml @@ -34,6 +34,20 @@ jobs: - name: Lint run: yarn d2-style check + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: c-hive/gha-yarn-cache@v1 + - run: yarn install --frozen-lockfile + - id: commitlint + run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") + - uses: wagoid/commitlint-github-action@v4 + with: + configFile: ${{ steps.commitlint.outputs.config_path }} + test: runs-on: ubuntu-latest steps: diff --git a/ci/dhis2-verify-pr-title.yml b/ci/dhis2-verify-pr-title.yml new file mode 100644 index 0000000..982a3c1 --- /dev/null +++ b/ci/dhis2-verify-pr-title.yml @@ -0,0 +1,18 @@ +name: 'dhis2: check pr title' + +on: + pull_request: + types: ['opened', 'edited', 'reopened', 'synchronize'] + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: c-hive/gha-yarn-cache@v1 + - run: yarn install --frozen-lockfile + - id: commitlint + run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") + - uses: JulienKode/pull-request-name-linter-action@v0.5.0 + with: + configuration-path: ${{ steps.commitlint.outputs.config_path }}