Skip to content

fix: add override_version for ansible-lint steps - #95

Open
adrienbourroux wants to merge 2 commits into
mainfrom
fix/75/composite-action-version-resolution
Open

fix: add override_version for ansible-lint steps#95
adrienbourroux wants to merge 2 commits into
mainfrom
fix/75/composite-action-version-resolution

Conversation

@adrienbourroux

@adrienbourroux adrienbourroux commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Fix ansible-lint version resolution in nested composite actions

When ansible-lint is invoked from this composite action, github.action_ref is not resolved correctly in the nested composite action case. As a result, the upstream action can fail to determine the expected pinned version. Passing override_version explicitly avoids that lookup and forces the correct version

Example of failure to be fixed by this
https://github.com/Scalingo/scalingo-ansible/actions/runs/31154931231/job/92792260688?pr=358

@adrienbourroux
adrienbourroux force-pushed the fix/75/composite-action-version-resolution branch from cf52e0d to 9f66305 Compare August 7, 2026 07:11
@adrienbourroux
adrienbourroux marked this pull request as ready for review August 7, 2026 07:13
@adrienbourroux
adrienbourroux requested a review from EtienneM August 7, 2026 07:13
Comment thread ansible-linter/action.yml
if: ${{ inputs.files == '' }}
uses: ansible/ansible-lint@262624cd0ab22a4221293216856c59671ce7aa5e # v26.6.0
with:
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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants