Skip to content

Commit 8c24775

Browse files
committed
Don't try to login to quay if a push is made by dependabot
Dependabot based push/pr builds don't have access to the quay secrets it seems (github magic?) (see [1], [2]) so lets avoid it all together. Dependabot pushes/PRs can be recognized by the github.actor value according to the GitHub docs[3]. Fixes #92 [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 Signed-off-by: Manuel Mendez <mmendez@equinix.com>
1 parent 8752d18 commit 8c24775

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/kernel-push.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
uses: actions/checkout@v2.3.5
1313

1414
- name: Login to quay.io
15+
if: ${{ github.actor == "dependabot[bot]" }}
1516
uses: docker/login-action@v1
1617
with:
1718
registry: quay.io

.github/workflows/push.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: For each commit
22
on:
33
push:
4+
branches:
5+
- main
46
paths-ignore:
57
- kernel/**
68
jobs:
@@ -18,6 +20,7 @@ jobs:
1820
uses: docker/setup-buildx-action@v1.3.0
1921

2022
- name: Login to quay.io
23+
if: ${{ github.actor == "dependabot[bot]" }}
2124
uses: docker/login-action@v1
2225
with:
2326
registry: quay.io

0 commit comments

Comments
 (0)