From 874763d56d77f9edfd2bd71167b2d76cbcb5e28b Mon Sep 17 00:00:00 2001 From: Jeffrey Cutter Date: Mon, 29 Jan 2024 14:48:43 +0800 Subject: [PATCH] Switch ansible-lint GitHub Workflow to pre-commit. To include gitleaks in the pipeline. --- .github/workflows/ansible-lint.yml | 15 --------------- .github/workflows/pre-commit.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 .github/workflows/ansible-lint.yml create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml deleted file mode 100644 index 1894b90..0000000 --- a/.github/workflows/ansible-lint.yml +++ /dev/null @@ -1,15 +0,0 @@ -# .github/workflows/ansible-lint.yml -name: ansible-lint -on: - pull_request: - branches: - - 'devspaces-[0-9].[0-9]+-rhel-8' - - devspaces-3-rhel-8 -jobs: - build: - name: Ansible Lint # Naming the build is important to use it as a status check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run ansible-lint - uses: ansible/ansible-lint@main # or version tag instead of 'main' diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..536b251 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,16 @@ +name: pre-commit +on: + pull_request: + branches: + - 'devspaces-[0-9].[0-9]+-rhel-8' + - devspaces-3-rhel-8 +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - name: Run pre-commit + uses: pre-commit/action@v3.0.0 + with: + extra_args: --all-files