diff --git a/.github/workflows/pre-commit-ansible.yaml b/.github/workflows/pre-commit-ansible.yaml new file mode 100644 index 00000000..cf237257 --- /dev/null +++ b/.github/workflows/pre-commit-ansible.yaml @@ -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 diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 0a04ead2..9eb501a1 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -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: diff --git a/.pre-commit-config-ansible.yaml b/.pre-commit-config-ansible.yaml new file mode 100644 index 00000000..9fce5a08 --- /dev/null +++ b/.pre-commit-config-ansible.yaml @@ -0,0 +1,5 @@ +repos: + - repo: https://github.com/ansible/ansible-lint.git + rev: v5.3.2 + hooks: + - id: ansible-lint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8b4763b3..69d7cef4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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: