From 3c32e2851d61a6c2ebbef0745ddaae65f6e2abc5 Mon Sep 17 00:00:00 2001 From: v-amolpatil Date: Thu, 14 Sep 2023 21:49:11 +0530 Subject: [PATCH] Skip packaging for dependabot PRs --- .github/workflows/package-command.yaml | 6 +++--- .github/workflows/package-on-merge.yaml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/package-command.yaml b/.github/workflows/package-command.yaml index 0f06fb0c7b2..a965591febc 100644 --- a/.github/workflows/package-command.yaml +++ b/.github/workflows/package-command.yaml @@ -18,13 +18,13 @@ on: types: [package-command, Package-command, PACKAGE-command] jobs: solutionNameDetails: - if: ${{ !github.event.pull_request.head.repo.fork }} + if: ${{ github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork }} uses: ./.github/workflows/getSolutionName.yaml secrets: inherit # BELOW JOB WILL CHECK IF WE NEED TO SKIP PACKAGE CREATION OR NOT checkSkipPackagingDetails: - if: ${{ needs.solutionNameDetails.outputs.solutionName != '' && !github.event.pull_request.head.repo.fork }} + if: ${{ github.actor != 'dependabot[bot]' && needs.solutionNameDetails.outputs.solutionName != '' && !github.event.pull_request.head.repo.fork }} uses: ./.github/workflows/checkSkipPackagingInfo.yaml secrets: inherit needs: solutionNameDetails @@ -34,7 +34,7 @@ jobs: neworexistingsolution: needs: [solutionNameDetails, checkSkipPackagingDetails] uses: ./.github/workflows/neworexistingsolution.yaml - if: ${{ needs.solutionNameDetails.outputs.solutionName != '' && needs.checkSkipPackagingDetails.outputs.isPackagingRequired == 'True' }} + if: ${{ github.actor != 'dependabot[bot]' && needs.solutionNameDetails.outputs.solutionName != '' && needs.checkSkipPackagingDetails.outputs.isPackagingRequired == 'True' }} with: solutionName: "${{ needs.solutionNameDetails.outputs.solutionName }}" secrets: inherit diff --git a/.github/workflows/package-on-merge.yaml b/.github/workflows/package-on-merge.yaml index 601fc1bcc55..e650ea7fda0 100644 --- a/.github/workflows/package-on-merge.yaml +++ b/.github/workflows/package-on-merge.yaml @@ -21,17 +21,17 @@ on: - closed jobs: checkAutomatedPR: - if: ${{ github.event.pull_request.merged && !github.event.pull_request.head.repo.fork }} + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.merged && !github.event.pull_request.head.repo.fork }} uses: ./.github/workflows/checkAutomatedPR.yaml solutionNameDetails: - if: ${{ github.event.pull_request.merged && !github.event.pull_request.head.repo.fork }} + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.merged && !github.event.pull_request.head.repo.fork }} needs: checkAutomatedPR uses: ./.github/workflows/getSolutionName.yaml secrets: inherit checkSkipPackagingDetails: - if: ${{ github.event.pull_request.merged && !github.event.pull_request.head.repo.fork && needs.solutionNameDetails.outputs.solutionName != '' }} + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.merged && !github.event.pull_request.head.repo.fork && needs.solutionNameDetails.outputs.solutionName != '' }} uses: ./.github/workflows/checkSkipPackagingInfo.yaml secrets: inherit needs: solutionNameDetails @@ -41,7 +41,7 @@ jobs: neworexistingsolution: needs: [solutionNameDetails, checkSkipPackagingDetails] uses: ./.github/workflows/neworexistingsolution.yaml - if: ${{ needs.solutionNameDetails.outputs.solutionName != '' && needs.checkSkipPackagingDetails.outputs.isPackagingRequired == 'True' }} + if: ${{ github.actor != 'dependabot[bot]' && needs.solutionNameDetails.outputs.solutionName != '' && needs.checkSkipPackagingDetails.outputs.isPackagingRequired == 'True' }} with: solutionName: "${{ needs.solutionNameDetails.outputs.solutionName }}" secrets: inherit