Skip to content

Conversation

@mmlb
Copy link
Contributor

@mmlb mmlb commented Nov 30, 2021

Description

Avoids logging into quay for dependabot builds.

Why is this needed

Fixes #92

Dependabot PRs are different than other non-contributor PRs in that the branch comes from this repo, which normally allows the secret to be available for CI yet the builds still fail (see 1, 2). It seems that GitHub does not make secrets available for these PRs as yet another special case 3. If we skip logging in to quay for dependabot then we side step this all together.

Dependabot pushes/PRs can be recognized by the github.actor value according to the GitHub docs 3.

I wanted to avoid logging in for non main pushes all together but that may make kernel testing harder than strictly necessary.

How Has This Been Tested?

CI?

How are existing users impacted? What migration steps/scripts do we need?

Updated dependencies sooner hopefully.

@mmlb mmlb force-pushed the do-not-push-to-quay-for-non-main-pushes branch 2 times, most recently from 58bd9af to 0de0e79 Compare November 30, 2021 16:56
Dependabot PRs are different than other non-contributor PRs in that the branch
comes from this repo, which normally allows the secret to be available for CI
yet the builds still fail (see [1], [2]). It seems that GitHub does not make
secrets available for these PRs as yet another special case [3]. If we skip
logging in to quay for dependabot then we side step this all together.

Dependabot pushes/PRs can be recognized by the github.actor value according to
the GitHub docs [3].

[1]: #89
[2]: #95
[3]: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions#handling-pull_request-events

Fixes #92

Signed-off-by: Manuel Mendez <mmendez@equinix.com>
@mmlb mmlb force-pushed the do-not-push-to-quay-for-non-main-pushes branch from 0de0e79 to c1f2037 Compare November 30, 2021 17:00
@mmlb mmlb added the ready-to-merge Signal to Mergify to merge the PR. label Nov 30, 2021
@mergify mergify bot merged commit ca1560f into main Nov 30, 2021
@mergify mergify bot deleted the do-not-push-to-quay-for-non-main-pushes branch November 30, 2021 20:38
mmlb added a commit that referenced this pull request Nov 30, 2021
We skip logging in to quay.io when github.actor is dependabot in [#96] but
did not check if any pushes were attempted. This was missed in the subsequent
dependabot PRs [#89] and [#95] because there was no branch protection setup
and I added the ready-to-merge label so mergify merged it :(. This should fix
that.

[#89]: #89
[#95]: #95
[#96]: #96

Signed-off-by: Manuel Mendez <mmendez@equinix.com>
mmlb added a commit that referenced this pull request Nov 30, 2021
We skipped logging in to quay.io when github.actor is dependabot in [#96] but
did not check if any pushes were attempted. This was missed in the subsequent
dependabot PRs [#89] and [#95] because there was no branch protection setup
and I added the ready-to-merge label so mergify merged it :(. This should fix
that.

[#89]: #89
[#95]: #95
[#96]: #96

Signed-off-by: Manuel Mendez <mmendez@equinix.com>
mmlb added a commit that referenced this pull request Nov 30, 2021
We skipped logging in to quay.io when github.actor is dependabot in [#96] but
did not check if any pushes were attempted. This change will avoid that
failure.

This was missed in the subsequent dependabot PRs [#89] and [#95] because there
was no branch protection setup and I added the ready-to-merge label so mergify
merged it :(. I've added branch protection to require the actions to pass.

[#89]: #89
[#95]: #95
[#96]: #96

Signed-off-by: Manuel Mendez <mmendez@equinix.com>
mergify bot added a commit that referenced this pull request Nov 30, 2021
## Description

Avoids pushing to quay if the PR/push originates from dependabot.

## Why is this needed

We skipped logging in to quay.io when github.actor is dependabot in [#96] but
did not check if any pushes were attempted. This change will avoid that
failure.

This was missed in the subsequent dependabot PRs [#89] and [#95] because there
was no branch protection setup and I added the ready-to-merge label so mergify
merged it :(. I've added branch protection to require the actions to pass.

[#89]: #89
[#95]: #95
[#96]: #96

## How Has This Been Tested?

CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Signal to Mergify to merge the PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: Build failure due to quay.io Docker image registry login failure

3 participants