From 9b87f10f0d3139f6c65c2342e1ba0e4e15351b74 Mon Sep 17 00:00:00 2001 From: Sagar Paul Date: Thu, 30 Nov 2023 13:43:29 +0530 Subject: [PATCH] fix lint - checkout before action (#309) * fix lint - checkout before action * Update tests.yml * Create .ansible-lint --------- Co-authored-by: Ashwini Mhatre Co-authored-by: Ashwini Mhatre --- .ansible-lint | 5 +++++ .github/workflows/lint.yml | 13 +++++++++++++ .github/workflows/tests.yml | 4 ---- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 .ansible-lint create mode 100644 .github/workflows/lint.yml diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..8d9bb70 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,5 @@ +--- +profile: production + +exclude_paths: + - changelogs/changelog.yaml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..4e45c59 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,13 @@ +--- +name: ansible-lint +on: # yamllint disable-line rule:truthy + pull_request: + branches: ["main"] +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/tests.yml b/.github/workflows/tests.yml index 081a2df..b0a1735 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,8 +13,6 @@ on: # yamllint disable-line rule:truthy - cron: '0 0 * * *' jobs: - ansible-lint: - uses: ansible-network/github_actions/.github/workflows/ansible-lint.yml@main changelog: uses: ansible-network/github_actions/.github/workflows/changelog.yml@main if: github.event_name == 'pull_request' @@ -28,7 +26,6 @@ jobs: all_green: if: ${{ always() }} needs: - - ansible-lint - changelog - integration - sanity @@ -38,7 +35,6 @@ jobs: - run: >- python -c "assert 'failure' not in set([ - '${{ needs.ansible-lint.result }}', '${{ needs.changelog.result }}', '${{ needs.integration.result }}', '${{ needs.sanity.result }}',