Skip to content

Commit

Permalink
chore: split pre-commit of ansible-lint (autowarefoundation#55)
Browse files Browse the repository at this point in the history
Signed-off-by: Kenji Miyake <[email protected]>
  • Loading branch information
kenji-miyake authored Feb 11, 2022
1 parent 220bb45 commit b793284
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pre-commit-ansible.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: pre-commit-ansible

on:
pull_request:

jobs:
pre-commit-ansible:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Install Ansible Galaxy depends for ansible-lint
run: |
ansible-galaxy collection install -f -r ansible-galaxy-requirements.yaml
- name: Run pre-commit
uses: autowarefoundation/autoware-github-actions/pre-commit@tier4/proposal
with:
pre-commit-config: .pre-commit-config-ansible.yaml
5 changes: 0 additions & 5 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2

# This can be removed if we'll manage ansible files in another repository.
- name: Install Ansible Galaxy depends for ansible-lint
run: |
ansible-galaxy collection install -f -r ansible-galaxy-requirements.yaml
- name: Run pre-commit
uses: autowarefoundation/autoware-github-actions/pre-commit@tier4/proposal
with:
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config-ansible.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/ansible/ansible-lint.git
rev: v5.3.2
hooks:
- id: ansible-lint
7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
ci:
autofix_commit_msg: "ci(pre-commit): autofix"
autoupdate_commit_msg: "ci(pre-commit): autoupdate"
skip:
- ansible-lint # https://github.com/pre-commit-ci/issues/issues/42

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -35,11 +33,6 @@ repos:
hooks:
- id: yamllint

- repo: https://github.com/ansible/ansible-lint.git
rev: v5.3.2
hooks:
- id: ansible-lint

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.3
hooks:
Expand Down

0 comments on commit b793284

Please sign in to comment.