Skip to content

Commit 6d2bb51

Browse files
committed
Only run the dependabot CI flow if we are in the dependabot context
1 parent 4b3909d commit 6d2bb51

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,29 @@ jobs:
2626
permissions:
2727
contents: write
2828
pull-requests: write
29+
env:
30+
IS_DEPENDABOT: ${{ secrets.DEPENDABOT_COMMIT_APP_PRIVATE_KEY != '' }}
2931
steps:
3032
- name: Checkout
3133
uses: actions/checkout@v4
3234
with:
3335
persist-credentials: false
3436
timeout-minutes: 5
37+
if: ${{ env.IS_DEPENDABOT == 'true' }}
3538

3639
- uses: ./.github/actions/common-setup
3740
with:
3841
platformCacheKey: ubuntu2204-amd64
3942
timeout-minutes: 10
43+
if: ${{ env.IS_DEPENDABOT == 'true' }}
4044

4145
- uses: actions/create-github-app-token@v1
4246
id: app-token
4347
with:
4448
app-id: ${{ vars.DEPENDABOT_COMMIT_APP_ID }}
4549
private-key: ${{ secrets.DEPENDABOT_COMMIT_APP_PRIVATE_KEY }}
4650
timeout-minutes: 5
51+
if: ${{ env.IS_DEPENDABOT == 'true' }}
4752

4853
- run: |
4954
if ! utils/checks/features-snapshot; then
@@ -62,3 +67,4 @@ jobs:
6267
git commit -m "Update features snapshot"
6368
git push --set-upstream origin "${{ github.ref }}"
6469
fi
70+
if: ${{ env.IS_DEPENDABOT == 'true' }}

0 commit comments

Comments
 (0)