From 1a8dd8ddfe4b6fba37480b0062daad02acd2aedd Mon Sep 17 00:00:00 2001 From: KB-perByte Date: Wed, 20 Sep 2023 12:01:32 +0530 Subject: [PATCH 1/2] fix lint workflow, update reference --- .ansible-lint | 3 +++ .github/workflows/lint.yml | 12 ++++++++++++ .github/workflows/tests.yml | 2 -- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.ansible-lint b/.ansible-lint index 0697b28d3..c97d3bfc0 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,4 +1,7 @@ --- +profile: production +exclude_paths: + - changelogs/changelog.yaml skip_list: # ansible-lint does not like the `import-3.11` ignore in tests/sanity/ignore-*.txt - sanity[cannot-ignore] diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..6890c6a8d --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,12 @@ +--- +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: + - 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 9f210428f..4410aba89 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,8 +11,6 @@ on: # yamllint disable-line rule:truthy workflow_dispatch: 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 sanity: From 7d60f7da3d3a3e7986f6d93c2f1783077b7e19ad Mon Sep 17 00:00:00 2001 From: KB-perByte Date: Wed, 20 Sep 2023 12:09:41 +0530 Subject: [PATCH 2/2] fix lint --- .github/workflows/tests.yml | 3 --- changelogs/fragments/trivial_lint.yaml | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/trivial_lint.yaml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4410aba89..6cd6ec7b6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,11 +22,9 @@ jobs: with: collection_pre_install: >- git+https://github.com/ansible-collections/ansible.utils.git - all_green: if: ${{ always() }} needs: - - ansible-lint - changelog - sanity - unit-galaxy @@ -36,7 +34,6 @@ jobs: - run: >- python -c "assert 'failure' not in set([ - '${{ needs.ansible-lint.result }}', '${{ needs.changelog.result }}', '${{ needs.sanity.result }}', '${{ needs.unit-galaxy.result }}', diff --git a/changelogs/fragments/trivial_lint.yaml b/changelogs/fragments/trivial_lint.yaml new file mode 100644 index 000000000..744f36321 --- /dev/null +++ b/changelogs/fragments/trivial_lint.yaml @@ -0,0 +1,3 @@ +--- +trivial: + - "Fix lint action reference."