-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Pin actions to a full length commit SHA #6341
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
run: | | ||
make release-notes | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
uses: softprops/action-gh-release@4716bde57e0fcda6ce83002e2469b8a90e560573 # v1 https://api.github.com/repos/softprops/action-gh-release/git/tags/4716bde57e0fcda6ce83002e2469b8a90e560573 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v1 seems to be: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't find 4716bde57e0fcda6ce83002e2469b8a90e560573 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. API endpoint (from above) seems to point to the same release commit commit if I'm reading the api endpoint right: I'm not sure why the shas are different though, but I guess it's the tag i.e. https://docs.github.com/en/rest/reference/git#tags There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Have you had a chance to look at this URL https://api.github.com/repos/softprops/action-gh-release/git/tags/4716bde57e0fcda6ce83002e2469b8a90e560573 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm maybe some GitHub issue. The URL didn't work for me a few hours before. But v1 is definitely not pointing to this commit: https://github.com/softprops/action-gh-release/releases/tag/v1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wrote something up https://gist.github.com/naveensrinivasan/ca008c07279176acce28969fb77d056f hope this helps. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay got the API query issue. But couldn't we just use the commit id linked at the release in the GitHub UI? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I think the most important question is, what would dependabot do? Does it update to the latest release or the latest tag and which sha would it use then? And also would it update the URL comment, because I prefer not adding the URL if we would have to update it manually after each dependabot PR to bump actions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It wouldn't add the URL. The dependabot would update to the latest tag instead of the version. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Okay then let's drop the URLs Would it update the comment with the tag behind the sha?
To clarify, the latest tag instead of the latest release? (or what do you mean with version?) |
||
with: | ||
draft: true | ||
files: out/* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,6 @@ jobs: | |
steps: | ||
- name: Verifier action | ||
id: verifier | ||
uses: kubernetes-sigs/[email protected] | ||
uses: kubernetes-sigs/kubebuilder-release-tools@4777888c377a26956f1831d5b9207eea1fa3bf29 # v0.1 https://api.github.com/repos/kubernetes-sigs/kubebuilder-release-tools/git/commits/4777888c377a26956f1831d5b9207eea1fa3bf29 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@naveensrinivasan My bad. I missed that they actually have a v7 and a v7.0.0 tag in this repo. That's why I though it is not just the commit id of the repo.
Do you know if dependabot will update the comment including the tag and the URL automatically?
Anyway for me it would be fine to drop the URL. I just didn't know / misread that it's directly a commit ID on the repo. I thought it might be a sha of a published "action artifact" or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we keep the URL, can you please link to those URLs instead: https://github.com/EndBug/add-and-commit/releases/tag/v7
This way the tag can be directly mapped to the commit id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I use the API to get the URL. Sorry, As of now I can do this.