Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ansible-linter/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ inputs:
description: "Path to a requirements.yml file used to install roles and collections before linting."
required: false
default: ""

files:
description: |
List of files to lint.
Expand All @@ -44,6 +43,8 @@ runs:
if: ${{ inputs.files == '' }}
uses: ansible/ansible-lint@262624cd0ab22a4221293216856c59671ce7aa5e # v26.6.0
with:
# Nested composites resolve github.action_ref to the parent; keep this SHA in sync with `uses`.
override_version: 262624cd0ab22a4221293216856c59671ce7aa5e

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: I don't understand the purpose of this instruction. Ca you explain?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without it, in this nested composite action, github.action_ref incorrectly resolves to the parent Scalingo/actions commit. ansible-lint then uses that SHA to build a URL against its own repository, which results in a 404.

example in https://github.com/Scalingo/scalingo-ansible/actions/runs/31154931231/job/92792260688?pr=358
image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EtienneM I added a comment to explain why override_version is needed. Is it clear enough now?

args: ${{ inputs.args }}
working_directory: ${{ inputs.working-directory }}
python_version: ${{ inputs.python-version }}
Expand All @@ -54,6 +55,8 @@ runs:
if: ${{ inputs.files != '' }}
uses: ansible/ansible-lint@262624cd0ab22a4221293216856c59671ce7aa5e # v26.6.0
with:
# Nested composites resolve github.action_ref to the parent; keep this SHA in sync with `uses`.
override_version: 262624cd0ab22a4221293216856c59671ce7aa5e
args: --version
working_directory: ${{ inputs.working-directory }}
python_version: ${{ inputs.python-version }}
Expand Down
Loading