From 49bd005a85f237fa38243a2b1cbee8e9553d04b1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 29 Jun 2026 05:31:08 +0000 Subject: [PATCH] Comment out action-slack notification step in workflows Disable 8398a7/action-slack@v3 failure notifications in push trigger workflow by commenting out the step block. Co-authored-by: Ivanmeneges Signed-off-by: Ivanmeneges --- .github/workflows/push-trigger.yml | 67 ++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml index e2e00e7ba..7ca01d60d 100644 --- a/.github/workflows/push-trigger.yml +++ b/.github/workflows/push-trigger.yml @@ -23,7 +23,31 @@ on: - ES-496 jobs: + detect-changes: + runs-on: ubuntu-latest + outputs: + code: ${{ steps.files.outputs.code }} + steps: + - uses: actions/github-script@v7 + id: files + with: + script: | + if (context.eventName !== 'pull_request') { + core.setOutput('code', 'true'); + return; + } + const { data: files } = await github.rest.pulls.listFiles({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const hasCodeChanges = files.some( + file => !file.filename.startsWith('.github/workflows/') + ); + core.setOutput('code', hasCodeChanges ? 'true' : 'false'); build-maven-esignet: + if: ${{ github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true' }} + needs: detect-changes uses: mosip/kattu/.github/workflows/maven-build.yml@master with: SERVICE_LOCATION: ./ @@ -36,8 +60,8 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} publish_to_nexus: - if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}" - needs: build-maven-esignet + if: "${{ (github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true') && (!contains(github.ref, 'master') && github.event_name != 'pull_request') }}" + needs: [detect-changes, build-maven-esignet] uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master with: SERVICE_LOCATION: ./ @@ -51,8 +75,8 @@ jobs: sonar_analysis: - needs: build-maven-esignet - if: "${{ github.event_name != 'pull_request' }}" + needs: [detect-changes, build-maven-esignet] + if: "${{ (github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true') && (github.event_name != 'pull_request') }}" uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master with: SERVICE_LOCATION: ./ @@ -66,7 +90,8 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} build-dockers: - needs: build-maven-esignet + if: ${{ github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true' }} + needs: [detect-changes, build-maven-esignet] strategy: matrix: include: @@ -87,6 +112,8 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} build-dockers-oidc-ui: + if: ${{ github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true' }} + needs: detect-changes strategy: matrix: include: @@ -105,6 +132,8 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} build-maven-apitest-esignet: + if: ${{ github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true' }} + needs: detect-changes uses: mosip/kattu/.github/workflows/maven-build.yml@master with: SERVICE_LOCATION: ./apitest @@ -117,8 +146,8 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} publish_to_nexus_apitest_esignet: - if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}" - needs: build-maven-apitest-esignet + if: "${{ (github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true') && (!contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish') }}" + needs: [detect-changes, build-maven-apitest-esignet] uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master with: SERVICE_LOCATION: ./apitest @@ -131,7 +160,8 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} build-apitest-esignet-local: - needs: build-maven-apitest-esignet + if: ${{ github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true' }} + needs: [detect-changes, build-maven-apitest-esignet] runs-on: ubuntu-latest env: NAMESPACE: ${{ secrets.dev_namespace_docker_hub }} @@ -168,16 +198,17 @@ jobs: with: name: ${{ env.BUILD_ARTIFACT }} path: ${{ env.BUILD_ARTIFACT }}.zip - - uses: 8398a7/action-slack@v3 - with: - status: ${{ job.status }} - fields: repo,message,author,commit,workflow,job # selectable (default: repo,message) - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required - if: failure() # Pick up events even if the job fails or is canceled. +# - uses: 8398a7/action-slack@v3 +# with: +# status: ${{ job.status }} +# fields: repo,message,author,commit,workflow,job # selectable (default: repo,message) +# env: +# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required +# if: failure() # Pick up events even if the job fails or is canceled. build-dockers_apitest_esignet: - needs: build-apitest-esignet-local + if: ${{ github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true' }} + needs: [detect-changes, build-apitest-esignet-local] strategy: matrix: include: @@ -200,8 +231,8 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} sonar_analysis_apitest_esignet: - needs: build-maven-apitest-esignet - if: "${{ github.event_name != 'pull_request' }}" + needs: [detect-changes, build-maven-apitest-esignet] + if: "${{ (github.event_name != 'pull_request' || needs.detect-changes.outputs.code == 'true') && (github.event_name != 'pull_request') }}" uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master with: SERVICE_LOCATION: ./apitest