Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Available contexts check wrongly checking input usage in with context. #495

Closed
maikelvdh opened this issue Dec 29, 2024 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@maikelvdh
Copy link
Contributor

The following construct is flagged as invalid (context "inputs" is not allowed here. no context is available here.):

uses: docker://<image-name>:latest
with:
  entrypoint: /bin/sh
  args: >
    --arg "${{ inputs.arg }}"

Though based on https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#context-availability this is valid, and equally this works fine.

@rhysd
Copy link
Owner

rhysd commented Dec 30, 2024

Thanks for reporting this. This is a bug of actionlint. inputs should be allowed here (jobs.<job_id>.with). This is the edge case that jobs.<job_id>.with.args causes. actionlint 1.7.5 started to check contexts used in args so this bug was revealed.

@rhysd rhysd closed this as completed in 331d6a9 Dec 30, 2024
@maikelvdh
Copy link
Contributor Author

Thanks for quick resolution @rhysd! Will you release 1.7.6 to get this availablr by any chance soon?

@rhysd
Copy link
Owner

rhysd commented Dec 30, 2024

I'd like to see if some other keys cause similar bugs for a few days. So I'm planning to create the next release at this weekend (Friday or Saturday in JST).

@Natim
Copy link

Natim commented Dec 30, 2024

IMHO, the 1.7.5 release could have been a 1.8.0 or even a 2.0.0 because it introduces a major change in how context is handled.

Once a bug has been discovered, it sounds reasonable not to wait to see if other bugs arrive to release patch releases such as 1.8.1 or 1.7.6. This is especially true since people will likely wait for the next release before upgrading, delaying the time other bugs are likely to be found.

This comment doesn't aim to be vindicative but tries to reflect on Semantic Versioning and how version numbers could be less conservative in their incrementation and more communicative of their intentions.

@rhysd
Copy link
Owner

rhysd commented Jan 4, 2025

v1.7.6 for fixing this issue was released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants