diff --git a/pillar.example b/pillar.example index d5d71e5d..25221f41 100644 --- a/pillar.example +++ b/pillar.example @@ -147,6 +147,7 @@ ssf: - vsftpd - zabbix semrel_files: + - .github/workflows/commitlint.yml - bin/kitchen - docs/TOFS_pattern.rst - formula/libsaltcli.jinja diff --git a/ssf/.github/workflows/commitlint.yml b/ssf/.github/workflows/commitlint.yml new file mode 100644 index 00000000..42a5375f --- /dev/null +++ b/ssf/.github/workflows/commitlint.yml @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +name: Commitlint +'on': [pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v1 diff --git a/ssf/defaults.yaml b/ssf/defaults.yaml index d1175dc5..5c88cb00 100644 --- a/ssf/defaults.yaml +++ b/ssf/defaults.yaml @@ -22,8 +22,8 @@ ssf_node_anchors: # An alternative method could be to use: # `git describe --abbrev=0 --tags` # yamllint disable rule:line-length rule:quoted-strings - title: "ci(kitchen+travis): adjust matrix to add '`'3000.2'`' & remove '`'2018.3'`'" - body: '* Automated using https://github.com/myii/ssf-formula/pull/171' + title: "ci(workflows/commitlint): add to repo [skip ci]" + body: '* Automated using https://github.com/myii/ssf-formula/pull/172' # yamllint enable rule:line-length rule:quoted-strings github: owner: 'saltstack-formulas' diff --git a/ssf/files/default/.github/workflows/commitlint.yml b/ssf/files/default/.github/workflows/commitlint.yml new file mode 100644 index 00000000..42a5375f --- /dev/null +++ b/ssf/files/default/.github/workflows/commitlint.yml @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +name: Commitlint +'on': [pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v1 diff --git a/ssf/formulas.yaml b/ssf/formulas.yaml index ab6b6622..1cb7c0d9 100644 --- a/ssf/formulas.yaml +++ b/ssf/formulas.yaml @@ -277,6 +277,8 @@ ssf_node_anchors: - pillar.example - pillar-with-views.example semrel_files: &semrel_files_default + .github/workflows/commitlint.yml: &file__--github__workflows__commitlint--yml + <<: *file_default bin/kitchen: &file__bin__kitchen <<: *file_default mode: 755 @@ -2211,6 +2213,7 @@ ssf: - ssf/defaults.yaml - ssf/formulas.yaml semrel_files: + .github/workflows/commitlint.yml: *file__--github__workflows__commitlint--yml docs/CONTRIBUTING.rst: *file__docs__CONTRIBUTING--rst docs/TOFS_pattern.rst: *file__docs__TOFS_pattern--rst formula/libtofs.jinja: *file__formula__libtofs--jinja @@ -2243,6 +2246,7 @@ ssf: travis: *travis_do_not_use_single_job_for_linters use_tofs: true semrel_files: + .github/workflows/commitlint.yml: *file__--github__workflows__commitlint--yml docs/TOFS_pattern.rst: <<: *file__docs__TOFS_pattern--rst dest_file: 'TOFS_pattern.rst'