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

ci: reference actions using tags #4086

Merged
merged 2 commits into from Jun 28, 2022
Merged

ci: reference actions using tags #4086

merged 2 commits into from Jun 28, 2022

Conversation

Fdawgs
Copy link
Member

@Fdawgs Fdawgs commented Jun 24, 2022

Using main is asking for trouble, if a broken commit is made to an action's branch then we will immediately feel it.
It is considered the least secure method of referencing GitHub Actions.

If we want to be as secure as possible then we should be referencing them using the full length commit SHAs.

Sources:

Checklist

@luisorbaiceta
Copy link
Member

The links-check actions would need to be updated too @Fdawgs

@jsumners
Copy link
Member

In my opinion, all of those references are discussing third party actions. The GitHub provided actions under the actions/* suite should be considered trustworthy. In fact, you are already doing so by referencing the version as a tag instead of an explicit git SHA. There is absolutely no difference in actions/checkout@v3 and actions/checkout@main in terms of security. So let's put that argument where it belongs.

Regarding "if a broken commit is made to an action's branch then we will immediately feel it." Put bluntly: I don't care. What I do care about is getting far fewer dependabot (or whatever other auto check bot) notifications that a new release is available. I don't care if they get automerged or not, the notifications still fill up my inbox with useless information. Referencing actions/whatever@main solves this problem.

I think it is highly unlikely we are going to be hit by any severe issue in the core GitHub actions. I am very willing to accept an occasional disruption in favor of reduced stress.

Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

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

targetting the major tags lets us to get fewer dependabot notification and check manually for major releases

@Eomm Eomm added the chore Small changes or internal project maintenance label Jun 25, 2022
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina
Copy link
Member

@jsumners I don't think these actions will bump majors very often. The disruption will be minimal for one repo. I still think keeping it to a tag like this is ok.

@Fdawgs Fdawgs changed the title ci(integration): reference actions using tags ci: reference actions using tags Jun 27, 2022
@Fdawgs
Copy link
Member Author

Fdawgs commented Jun 27, 2022

The links-check actions would need to be updated too @Fdawgs

Thanks @luisorbaiceta, got that one in 57b77ad

What I do care about is getting far fewer dependabot (or whatever other auto check bot) notifications that a new release is available. I don't care if they get automerged or not, the notifications still fill up my inbox with useless information.

I think it's a good idea to reduce Dependabot notifications @jsumners, but I think we're looking in the wrong place.
GitHub Actions are only checked once a month, as per the Dependabot config, and since we're using major tags we rarely get any Dependabot PRs for them (as mentioned by @Eomm and @mcollina). As an example, actions/checkout has multi-year gaps between each of its majors.
If we really want to cut down on Dependabot notifications we should decrease the NPM dependency checks from weekly to monthly.

@simoneb
Copy link
Contributor

simoneb commented Jun 27, 2022

I expressed my opinion on this already and I disagreed with @jsumners introducing this change arbitrarily. Ultimately my main concern around using branch references is that what lands in the main branch is not deemed stable, so using it is unadvisable.

Using major tag references instead is in my opinion the best compromise between staying up to date with fixes and improvements to the action, limiting the noise produced by dependabot and relying on something that's stable.

@mcollina
Copy link
Member

I think most of us are in favor of landing this. Is there anything more you'd like to add @jsumners ?

@jsumners
Copy link
Member

I disagreed with @jsumners introducing this change arbitrarily.

Making requests in code review is not arbitrary. That's the point of them.

I think most of us are in favor of landing this. Is there anything more you'd like to add @jsumners ?

I have not blocked this.

@mcollina mcollina merged commit 8fccc46 into main Jun 28, 2022
@mcollina mcollina deleted the ci/integration branch June 28, 2022 12:23
@mcollina
Copy link
Member

Awesome! Landed

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chore Small changes or internal project maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants