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

feat(github-action): Support updating digest pinned actions #10835

Merged
merged 17 commits into from Jul 14, 2021

Conversation

viceice
Copy link
Member

@viceice viceice commented Jul 14, 2021

Changes:

Support updating github action sha pinned actions.

Sample pr's:

Context:

closes #7537

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@viceice viceice requested a review from rarkins July 14, 2021 08:33
@viceice viceice changed the title Feat/gh action pinning feat(github-action): Support updating digest pinned actions Jul 14, 2021
@rarkins
Copy link
Collaborator

rarkins commented Jul 14, 2021

Can you also create feature issues for:

  • supporting an informative "version" field for Renovate to use as currentValue, so that we don't need to propose a PR every time there's a commit to the action's main branch?
  • supporting displaying a gitRef deep link diff (could apply to more than just actions)

I think we need both of these in order for actions digest PRs to be more usable

rarkins
rarkins previously approved these changes Jul 14, 2021
@viceice viceice marked this pull request as draft July 14, 2021 08:46
@viceice
Copy link
Member Author

viceice commented Jul 14, 2021

add tag follow support for pinned actions via renovate comment

@rarkins
Copy link
Collaborator

rarkins commented Jul 14, 2021

Do we support pinning digests for actions? And can it move the tag to a comment if it does? :)

lib/manager/github-actions/readme.md Outdated Show resolved Hide resolved
lib/manager/github-actions/readme.md Outdated Show resolved Hide resolved
lib/manager/github-actions/extract.ts Outdated Show resolved Hide resolved
@viceice
Copy link
Member Author

viceice commented Jul 14, 2021

Do we support pinning digests for actions? And can it move the tag to a comment if it does? :)

Not yet, working on it 🙃

Copy link
Collaborator

@HonkingGoose HonkingGoose left a comment

Choose a reason for hiding this comment

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

Some docs changes to keep up with new feature.

lib/manager/github-actions/readme.md Outdated Show resolved Hide resolved
@viceice viceice marked this pull request as ready for review July 14, 2021 09:50
viceice and others added 3 commits July 14, 2021 11:50
@viceice
Copy link
Member Author

viceice commented Jul 14, 2021

It now also supports pin digests with auto replace 🎉

Copy link
Member Author

@viceice viceice left a comment

Choose a reason for hiding this comment

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

Anything missing?

lib/workers/branch/auto-replace.ts Show resolved Hide resolved
lib/manager/github-actions/readme.md Outdated Show resolved Hide resolved
lib/manager/github-actions/readme.md Outdated Show resolved Hide resolved
@rarkins
Copy link
Collaborator

rarkins commented Jul 14, 2021

Thought I already commented here but can't see it. Need to test the use case where tag version remains same but digest is updated. Valid tag with bogus sha in base branch should reproduce it.

Also I noted that the pr body comment for pinning is wrong/outdated but it's unrelated to this PR

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
@viceice
Copy link
Member Author

viceice commented Jul 14, 2021

Thought I already commented here but can't see it. Need to test the use case where tag version remains same but digest is updated. Valid tag with bogus sha in base branch should reproduce it.

Also I noted that the pr body comment for pinning is wrong/outdated but it's unrelated to this PR

Sure, creating sample pr

@viceice
Copy link
Member Author

viceice commented Jul 14, 2021

Thought I already commented here but can't see it. Need to test the use case where tag version remains same but digest is updated. Valid tag with bogus sha in base branch should reproduce it.

Also I noted that the pr body comment for pinning is wrong/outdated but it's unrelated to this PR

@rarkins see viceice-tests/gh-action-digests#7 works 🎉

rarkins
rarkins previously approved these changes Jul 14, 2021
@rarkins rarkins enabled auto-merge (squash) July 14, 2021 10:58
@rarkins rarkins merged commit 48c33be into main Jul 14, 2021
@rarkins rarkins deleted the feat/gh-action-pinning branch July 14, 2021 10:58
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 25.56.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pin GitHub Action Git SHA (Digest Pinning)
4 participants