From 1266748294bfeef876f70e0bbb494bd24a7fcfd1 Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Fri, 9 Feb 2024 23:21:53 -0300 Subject: [PATCH] Only run the dependabot CI flow if we are in the dependabot context --- .github/workflows/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 7093c1254..cf2f0b76d 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -26,17 +26,21 @@ 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 @@ -44,6 +48,7 @@ jobs: 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 @@ -62,3 +67,4 @@ jobs: git commit -m "Update features snapshot" git push --set-upstream origin "${{ github.ref }}" fi + if: ${{ env.IS_DEPENDABOT != 'true' }}