Skip to content

Commit

Permalink
fix lint workflow, update reference (#432)
Browse files Browse the repository at this point in the history
* fix lint workflow, update reference

* fix lint checkout

* Update .ansible-lint

* Update tests.yml

---------

Co-authored-by: Ruchi Pakhle <[email protected]>
Co-authored-by: Ashwini Mhatre <[email protected]>
Co-authored-by: Ashwini Mhatre <[email protected]>
  • Loading branch information
4 people authored Nov 30, 2023
1 parent fd28ea6 commit b2fdc72
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +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
13 changes: 13 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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'
4 changes: 0 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -31,7 +29,6 @@ jobs:
all_green:
if: ${{ always() }}
needs:
- ansible-lint
- changelog
- sanity
- unit-galaxy
Expand All @@ -41,7 +38,6 @@ jobs:
- run: >-
python -c "assert 'failure' not in
set([
'${{ needs.ansible-lint.result }}',
'${{ needs.changelog.result }}',
'${{ needs.sanity.result }}',
'${{ needs.unit-galaxy.result }}',
Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/trivial_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- "Fix lint action reference."

0 comments on commit b2fdc72

Please sign in to comment.