Skip to content

Pinned version checks out main not version #4775

@rohun-apex

Description

@rohun-apex
Summary

Using ansible-lint at a pinned version appears not to work, e.g. ansible/[email protected]. It will use main.

Issue Type
  • Bug Report
OS / ENVIRONMENT

Ansible lint version: Attempting to use v25.8.2 via GHA tool. Actually using main because of the apparent bug.

ansible-lint 25.8.3.dev19 using ansible-core:2.19.2 ansible-compat:25.8.1 ruamel-yaml:0.18.15 ruamel-yaml-clib:0.2.12

OS: GHA's runs-on: ubuntu-latest.

  • ansible installation method: pip
  • ansible-lint installation method: pip
STEPS TO REPRODUCE
  1. Create a GHA job to run lint on a repo (see below code block).
  2. Create any valid code for the GHA to checkout and lint.

name: ansible-lint
on: [pull_request]
jobs:
build:
name: Ansible Lint
runs-on: ubuntu-latest
steps:

Desired Behavior

Want it to checkout the ref I specify via ansible-lint@version.

Actual Behavior

It checks out main.

Image
Code changes

I have made a PR to attempt to fix. Please feel free to modify as appropriate.
#4774

Metadata

Metadata

Assignees

No one assigned

    Labels

    newTriage required

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions