Skip to content

Commit

Permalink
Only run the dependabot CI flow if we are in the dependabot context
Browse files Browse the repository at this point in the history
  • Loading branch information
MOZGIII committed Feb 10, 2024
1 parent 4b3909d commit 1266748
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,29 @@ jobs:
permissions:
contents: write
pull-requests: write
env:
IS_DEPENDABOT: ${{ secrets.DEPENDABOT_COMMIT_APP_PRIVATE_KEY != '' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
timeout-minutes: 5
if: ${{ env.IS_DEPENDABOT != 'true' }}

- uses: ./.github/actions/common-setup
with:
platformCacheKey: ubuntu2204-amd64
timeout-minutes: 10
if: ${{ env.IS_DEPENDABOT != 'true' }}

- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.DEPENDABOT_COMMIT_APP_ID }}
private-key: ${{ secrets.DEPENDABOT_COMMIT_APP_PRIVATE_KEY }}
timeout-minutes: 5
if: ${{ env.IS_DEPENDABOT != 'true' }}

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

0 comments on commit 1266748

Please sign in to comment.