From 90bf950778f46863bccb149a9d46feec1e1700a0 Mon Sep 17 00:00:00 2001 From: Tvion Date: Wed, 18 Feb 2026 18:14:24 +0500 Subject: [PATCH 1/4] fix: Disable deployment and push for dependabot --- .github/workflows/build.yaml | 17 ++++++++++++++++- .github/workflows/dependabot.yaml | 5 +++-- .github/workflows/run_tests.yaml | 1 + 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 99ea22bc..2817d279 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,11 +3,25 @@ on: pull_request: types: [opened, synchronize, reopened] branches: [main] + paths-ignore: + - "docs/**" + - "CODE-OF-CONDUCT.md" + - "CONTRIBUTING.md" + - "LICENSE" + - "README.md" + - "SECURITY.md" release: types: [created] push: branches: - '**' + paths-ignore: + - "docs/**" + - "CODE-OF-CONDUCT.md" + - "CONTRIBUTING.md" + - "LICENSE" + - "README.md" + - "SECURITY.md" workflow_dispatch: inputs: publish_docker: @@ -22,7 +36,7 @@ concurrency: env: TAG_NAME: ${{ github.event.release.tag_name || github.ref_name }} - PUSH: ${{ github.event_name != 'workflow_dispatch' || inputs.publish_docker }} + PUSH: ${{ (github.event_name != 'workflow_dispatch' || inputs.publish_docker) && github.actor != 'dependabot[bot]' }} jobs: detect-changes: @@ -52,6 +66,7 @@ jobs: - uses: dorny/paths-filter@v3 id: filter with: + base: ${{ github.event.before }} filters: | operator: - 'operator/**' diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml index d7ac45c6..6b22def9 100644 --- a/.github/workflows/dependabot.yaml +++ b/.github/workflows/dependabot.yaml @@ -39,7 +39,8 @@ jobs: github-token: "${{ secrets.GITHUB_TOKEN }}" - run: | gh pr review --approve "$PR_URL" - gh pr merge --squash --auto "$PR_URL" + # gh pr merge --squash --auto "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}} \ No newline at end of file + GITHUB_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}} + # GITHUB_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index 7f937105..3c915488 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -26,6 +26,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} poll-interval: 20 Pgskipper-Pipeline: + if: ${{ github.actor != 'dependabot[bot]' }} needs: Wait-for-images uses: Netcracker/qubership-test-pipelines/.github/workflows/pgskipper.yaml@acf44dc8f22430d11eb93a679bf54e99b69ee6a2 #v1.5.0 with: From 63792062e8073a812c973a4dfc481c91e5c5ec62 Mon Sep 17 00:00:00 2001 From: Tvion Date: Wed, 18 Feb 2026 19:05:41 +0500 Subject: [PATCH 2/4] test skip job --- .github/workflows/build.yaml | 2 +- .github/workflows/run_tests.yaml | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2817d279..abbe5b88 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -264,7 +264,7 @@ jobs: package-version-ids: ${{ steps.get-ids-for-delete.outputs.ids-for-delete }} build-status: needs: build - if: always() + if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - name: Check build status diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index 3c915488..65f51dec 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -26,7 +26,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} poll-interval: 20 Pgskipper-Pipeline: - if: ${{ github.actor != 'dependabot[bot]' }} + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.user.login != 'dependabot[bot]' }} needs: Wait-for-images uses: Netcracker/qubership-test-pipelines/.github/workflows/pgskipper.yaml@acf44dc8f22430d11eb93a679bf54e99b69ee6a2 #v1.5.0 with: @@ -36,4 +36,16 @@ jobs: secrets: AWS_S3_ACCESS_KEY_ID: ${{secrets.AWS_S3_ACCESS_KEY_ID}} AWS_S3_ACCESS_KEY_SECRET: ${{secrets.AWS_S3_ACCESS_KEY_SECRET}} + Tests-Result: + if: always() + needs: Pgskipper-Pipeline + runs-on: ubuntu-latest + steps: + - name: Check tests status + run: | + if [[ "${{ needs.Pgskipper-Pipeline.result }}" != "success" && "${{ needs.Pgskipper-Pipeline.result }}" != "skipped" ]]; then + echo "Tests were failed" + exit 1 + fi + echo "All tests completed successfully or not required" From 8dcab83234475ebe556638c36c70a1d4a28d83d4 Mon Sep 17 00:00:00 2001 From: Tvion Date: Wed, 18 Feb 2026 19:23:21 +0500 Subject: [PATCH 3/4] fix: build only if PR exist --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index abbe5b88..11790fcd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,7 +2,8 @@ name: Build Pgskipper Components on: pull_request: types: [opened, synchronize, reopened] - branches: [main] + branches: + - '**' paths-ignore: - "docs/**" - "CODE-OF-CONDUCT.md" @@ -14,7 +15,7 @@ on: types: [created] push: branches: - - '**' + - 'main' paths-ignore: - "docs/**" - "CODE-OF-CONDUCT.md" From b1f2bad0e7dc9a3d2efe8868f687eef93b742682 Mon Sep 17 00:00:00 2001 From: Tvion Date: Wed, 18 Feb 2026 19:27:08 +0500 Subject: [PATCH 4/4] fix: do not wait if not dependabot --- .github/workflows/dependabot.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml index 6b22def9..f10d3d16 100644 --- a/.github/workflows/dependabot.yaml +++ b/.github/workflows/dependabot.yaml @@ -12,6 +12,7 @@ permissions: jobs: Wait-for-tests: + if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} runs-on: ubuntu-latest strategy: fail-fast: false