chore(deps): update ansible/ansible-lint action to v25.11.0 #1925
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Ansible CI | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - edited | |
| - reopened | |
| - synchronize | |
| - labeled | |
| workflow_dispatch: | |
| concurrency: | |
| group: ansible-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| ANSIBLE_FORCE_COLOR: true | |
| ANSIBLE_GALAXY_SERVER_GALAXY_URL: "https://galaxy.ansible.com" | |
| ANSIBLE_GALAXY_SERVER_GALAXY_TIMEOUT: 120 | |
| ANSIBLE_GALAXY_SERVER_LIST: "galaxy" | |
| jobs: | |
| ansible-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Lint collection | |
| uses: ansible/ansible-lint@43e758bad47344f1ce7b699c0020299f486a8026 # v25.11.0 | |
| with: | |
| requirements_file: requirements.yml | |
| arguments-spec-lint: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: quay.io/prometheus/golang-builder:base | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Lint arguments spec | |
| run: ./.github/scripts/lint_arguments_spec.sh | |
| check-unused-variables: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Run action | |
| uses: hoo29/little-timmy@c8ca5086db961499fc3d4e37637f566c3d0ec6d6 # v3-action | |
| discover-ansible-versions: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| versions: ${{ steps.supported-ansible-versions.outputs.result }} | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Get Ansible versions that the collection supports | |
| id: supported-ansible-versions | |
| run: | | |
| echo "result=$(python ./.github/scripts/collection_version_parser.py)" >> $GITHUB_OUTPUT | |
| ansible-test-sanity: | |
| uses: ./.github/workflows/ansible-test-sanity.yml | |
| needs: | |
| - discover-ansible-versions | |
| with: | |
| ansible-core-versions: ${{ needs.discover-ansible-versions.outputs.versions }} | |
| discover-ansible-tests: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - ansible-lint | |
| outputs: | |
| integration-tests: ${{ steps.set-integration-tests.outputs.tests }} | |
| ansible-roles: ${{ steps.set-ansible-roles.outputs.roles }} | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch current PR labels | |
| id: fetch-labels | |
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
| with: | |
| script: | | |
| const { owner, repo } = context.repo; | |
| const issue_number = context.issue.number; | |
| const labels = await github.paginate( | |
| github.rest.issues.listLabelsOnIssue, | |
| { owner, repo, issue_number } | |
| ); | |
| const names = labels.map(l => l.name); | |
| core.info(`Current labels: ${names.join(', ') || '(none)'}`); | |
| core.setOutput('names', JSON.stringify(names)); | |
| - name: Discover ansible roles | |
| id: set-ansible-roles | |
| env: | |
| LABELS: ${{ steps.fetch-labels.outputs.names }} | |
| run: | | |
| roles=$(echo $LABELS | jq -c '[.[] | select(startswith("roles/")) | ltrimstr("roles/")]') | |
| echo $roles | |
| echo "roles=$roles" >> $GITHUB_OUTPUT | |
| - name: Discover integration tests | |
| id: set-integration-tests | |
| run: | | |
| echo tests="[`for test in $(find tests/integration/targets -maxdepth 1 -mindepth 1 -type d -not -iname "molecule-*" -printf "%f\n"); do | |
| echo '{"test":\"'"${test}"'\","name":\"'"${test}\"'"}'; | |
| done | tr '\n' ',' | sed '$s/,$//'`]" >> $GITHUB_OUTPUT | |
| molecule: | |
| uses: ./.github/workflows/ansible-test-molecule.yml | |
| needs: | |
| - discover-ansible-tests | |
| - discover-ansible-versions | |
| if: needs.discover-ansible-tests.outputs.ansible-roles != '[]' && | |
| needs.discover-ansible-tests.outputs.ansible-roles != '' | |
| with: | |
| role: ${{ matrix.role }} | |
| ansible-core-versions: ${{ needs.discover-ansible-versions.outputs.versions }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| role: ${{ fromJson(needs.discover-ansible-tests.outputs.ansible-roles) }} | |
| ansible-test-integration: | |
| uses: ./.github/workflows/ansible-test-integration.yml | |
| needs: | |
| - discover-ansible-tests | |
| - discover-ansible-versions | |
| if: | |
| needs.discover-ansible-tests.outputs.integration-tests != '[]' && | |
| needs.discover-ansible-tests.outputs.integration-tests != '' | |
| with: | |
| targets: ${{ needs.discover-ansible-tests.outputs.integration-tests }} | |
| ansible-core-versions: ${{ needs.discover-ansible-versions.outputs.versions }} |