-
Notifications
You must be signed in to change notification settings - Fork 891
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
Dependabot can not access the secrets #4761
Comments
Just added the Secret for Dependabot as per Adding a repository secret for Dependabot. |
@liangyuanpeng Do you know why avoid triggering on the "push" event for Dependabot branches with Code Scanning? If it's just a permission issue, can we just add write permission? |
I found the PR for this warnning log and seems like it just wanted to draw people's attention to the fact that this requires write permissions. |
The diff --git a/.github/workflows/ci-image-scanning.yaml b/.github/workflows/ci-image-scanning.yaml
index 1774ec0c1..c1b1c801b 100644
--- a/.github/workflows/ci-image-scanning.yaml
+++ b/.github/workflows/ci-image-scanning.yaml
@@ -1,6 +1,10 @@
name: image-scanning
on:
- push:
+ push:
+ # Exclude branches created by Dependabot to avoid triggering current workflow
+ # for PRs initiated by Dependabot.
+ branches-ignore:
+ - 'dependabot/**'
jobs:
use-trivy-to-scan-image:
name: image-scanning
diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml
index 05165eeb3..f9d41046d 100644
--- a/.github/workflows/fossa.yml
+++ b/.github/workflows/fossa.yml
@@ -1,6 +1,10 @@
name: FOSSA
on:
push:
+ # Exclude branches created by Dependabot to avoid triggering current workflow
+ # for PRs initiated by Dependabot.
+ branches-ignore:
+ - 'dependabot/**'
jobs:
fossa:
name: FOSSA What do you think? by the way: |
Since dependabot's PR is always updating dependencies and not add a dependenice, I agree it can be skipped.
@RainbowMango |
Yes, the push event actually triggered in the branch of dependbot. We want to figure out why the [push] workflow appears in the check screen of an open PR and intercepts the merge of the PR if it fails. If it's a workflow mechanism, then we can circumvent it as suggested by @RainbowMango |
+1. |
So, @liangyuanpeng what do you say, shall we do it in #4762? |
I removed the secrets as we don't need it anymore(skipped push events for branches created by dependabot). karmada/.github/workflows/fossa.yml Lines 3 to 7 in 24ce7e4
|
What would you like to be added:
/assign
I really tested the dependabot on my fork, and skiped some CI due to
if: ${{ github.repository == 'karmada-io/karmada' }}
.Now, have two case need to resolve,
FOSSA failed
karmada/.github/workflows/fossa.yml
Line 18 in ff7322a
It can be resolved by add a secrets of dependabot. cc @RainbowMango
upload sarif to codeql failed
karmada/.github/workflows/ci-image-scanning.yaml
Lines 47 to 50 in ff7322a
Follow the warning, let this CI working on pull_request for dependabot to resolve it.
verifying at https://github.com/liangyuanpeng/karmada/actions/runs/8460139871/job/23177775457?pr=53
Why is this needed:
The text was updated successfully, but these errors were encountered: