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

Fix use of versioned github action #3762

Merged
merged 22 commits into from Nov 28, 2023
Merged

Fix use of versioned github action #3762

merged 22 commits into from Nov 28, 2023

Conversation

karl-johan-grahn
Copy link
Contributor

@karl-johan-grahn karl-johan-grahn commented Sep 21, 2023

The README would need to be updated too because tagging the GitHub action runner won't work for earlier versions that this PR will eventually be part of - earlier versions will always use main. Updating the README has to be done after this PR has been merged though, since we don't know the version this fix will be part of.

Fixes: #3761
Related: https://github.com/orgs/community/discussions/49245
Related: actions/runner#2473

@karl-johan-grahn karl-johan-grahn temporarily deployed to ack September 21, 2023 09:08 — with GitHub Actions Inactive
@ssbarnea ssbarnea changed the title Fix for issue 3761 Fix use of versioned github action Sep 21, 2023
@ssbarnea ssbarnea added the bug label Sep 21, 2023
@ssbarnea ssbarnea temporarily deployed to ack September 21, 2023 10:23 — with GitHub Actions Inactive
@ssbarnea ssbarnea self-assigned this Sep 21, 2023
@ssbarnea ssbarnea temporarily deployed to ack September 21, 2023 10:27 — with GitHub Actions Inactive
@ssbarnea ssbarnea marked this pull request as draft September 21, 2023 10:53
@ssbarnea

This comment was marked as outdated.

ChristopherHX

This comment was marked as outdated.

@karl-johan-grahn karl-johan-grahn temporarily deployed to ack September 21, 2023 19:45 — with GitHub Actions Inactive
@karl-johan-grahn karl-johan-grahn temporarily deployed to ack September 21, 2023 19:45 — with GitHub Actions Inactive
action.yml Outdated Show resolved Hide resolved
@karl-johan-grahn karl-johan-grahn temporarily deployed to ack September 21, 2023 20:08 — with GitHub Actions Inactive
@karl-johan-grahn karl-johan-grahn temporarily deployed to ack September 21, 2023 20:14 — with GitHub Actions Inactive
@karl-johan-grahn karl-johan-grahn marked this pull request as ready for review September 21, 2023 20:14
@ChristopherHX
Copy link

@karl-johan-grahn I assume this works now, if you reference the action via uses: ansible/ansible-lint@<tag> (refs/pull/3762/head doesn't work)
I'm just a random GitHub user and commented here, because this change has been mentioned in a subscribed actions/runner issue.

You need a reviewer from this project, I can't help you with that.

Seems like if action_ref is refs/pull/3762/head the wget breaks, but I'm probably only one of a very small amount of people trying very exotic action versions.

@karl-johan-grahn
Copy link
Contributor Author

@ssbarnea please review and any plans to merge this soon? 🙇

@karl-johan-grahn karl-johan-grahn temporarily deployed to ack October 19, 2023 07:21 — with GitHub Actions Inactive
@karl-johan-grahn karl-johan-grahn temporarily deployed to ack October 19, 2023 13:12 — with GitHub Actions Inactive
@karl-johan-grahn karl-johan-grahn temporarily deployed to ack October 22, 2023 22:27 — with GitHub Actions Inactive
@karl-johan-grahn
Copy link
Contributor Author

@ajinkyau @priyamsahoo @ChristopherHX @shatakshiiii @ssbarnea any possibility to merge this soon?

@ChristopherHX
Copy link

Please look at actions/runner#2473 (comment), there is another defect in actions/runner. Only appears if you nest composite actions.

FYI It is possible to add version information into the downloaded zip (act won't be compatible with that) like done here: psf/black#3543

@karl-johan-grahn
Copy link
Contributor Author

Is the action nested for this repo's workflow?

@ChristopherHX
Copy link

Is the action nested for this repo's workflow?

No, but the user can use the action in their own composite action and hit the problem.

E.g.

runs:
  using: composite
  steps:
  - uses: ansible/ansible-lint@v6.21.1

Will not get v6.21.1, but the tag of the action.yml posted above.

@karl-johan-grahn
Copy link
Contributor Author

At least it will be one step better than now

@karl-johan-grahn karl-johan-grahn temporarily deployed to ack October 24, 2023 15:30 — with GitHub Actions Inactive
@karl-johan-grahn karl-johan-grahn temporarily deployed to ack October 26, 2023 08:18 — with GitHub Actions Inactive
@karl-johan-grahn karl-johan-grahn temporarily deployed to ack October 27, 2023 07:31 — with GitHub Actions Inactive
@ssbarnea ssbarnea temporarily deployed to ack October 30, 2023 13:07 — with GitHub Actions Inactive
@ssbarnea ssbarnea merged commit d7c9bff into ansible:main Nov 28, 2023
19 of 20 checks passed
softwarefactory-project-zuul bot pushed a commit to ansible-collections/kubernetes.core that referenced this pull request May 8, 2024
[PR #707/874fbfed backport][stable-3] Update ansible-lint GHA

This is a backport of PR #707 as merged into main (874fbfe).
SUMMARY

There seems to be a bug in older versions of ansible-lint where pinning to a version for the GHA still installs the main branch.
See ansible/ansible-lint#3762 for more info.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mike Graves <mgraves@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

GitHub Action tagging doesn't work as expected
3 participants