diff --git a/.github/actions/notify-slack/action.yml b/.github/actions/notify-slack/action.yml deleted file mode 100644 index 1ff425b51c6..00000000000 --- a/.github/actions/notify-slack/action.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Notify Slack -inputs: - token: - required: true -runs: - using: composite - steps: - - shell: bash - run: >- - curl -X POST -H 'Content-type: application/json' --data '{"attachments": [{"text": "Job in *nightly* failed", "footer": "", "color": "danger", "mrkdwn_in": ["text"]}]}' ${{ inputs.token }} diff --git a/.github/workflows/nightly-results.yml b/.github/workflows/nightly-results.yml new file mode 100644 index 00000000000..c1c4da72ca5 --- /dev/null +++ b/.github/workflows/nightly-results.yml @@ -0,0 +1,16 @@ +name: Nightly results +on: + workflow_run: + workflows: + - Nightly + types: + - completed +jobs: + on-failure: + runs-on: ubuntu-latest + if: ${{ github.repository == 'php/php-src' && github.event.workflow_run.conclusion == 'failure' }} + steps: + - run: | + export DEBIAN_FRONTEND=noninteractive + sudo apt-get install -y curl + curl -X POST -H 'Content-type: application/json' --data '{"attachments": [{"text": "Job in *nightly* failed", "footer": "<${{ github.event.workflow_run.jobs_url }}|View Run>", "color": "danger", "mrkdwn_in": ["text"]}]}' ${{ secrets.ACTION_MONITORING_SLACK }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ded06c46b2e..adf07313a4c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -138,12 +138,6 @@ jobs: -d opcache.enable_cli=1 - name: Extra tests uses: ./.github/actions/extra-tests - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} - LINUX_X64: services: mysql: @@ -272,11 +266,6 @@ jobs: uses: ./.github/actions/extra-tests - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} LINUX_X32: strategy: fail-fast: false @@ -358,11 +347,6 @@ jobs: -d opcache.enable_cli=1 - name: Extra tests uses: ./.github/actions/extra-tests - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} MACOS: strategy: fail-fast: false @@ -418,11 +402,6 @@ jobs: uses: ./.github/actions/extra-tests - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} COVERAGE_DEBUG_NTS: if: inputs.branch == 'master' services: @@ -483,11 +462,6 @@ jobs: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} verbose: true - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} COMMUNITY: strategy: fail-fast: false @@ -674,11 +648,6 @@ jobs: if [ $EXIT_CODE -gt 128 ]; then exit 1 fi - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} OPCACHE_VARIATION: services: mysql: @@ -760,11 +729,6 @@ jobs: -d opcache.file_cache_only=1 - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} MSAN: name: MSAN runs-on: ubuntu-${{ inputs.ubuntu_version }} @@ -851,11 +815,6 @@ jobs: -d opcache.enable_cli=1 - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} LIBMYSQLCLIENT: name: LIBMYSQLCLIENT runs-on: ubuntu-${{ inputs.ubuntu_version }} @@ -898,11 +857,6 @@ jobs: withMysqli: ${{ inputs.libmysqlclient_with_mysqli }} - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} PECL: if: inputs.branch == 'master' runs-on: ubuntu-22.04 @@ -1010,11 +964,6 @@ jobs: /opt/php/bin/phpize ./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config make -j$(/usr/bin/nproc) - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} WINDOWS: strategy: fail-fast: false diff --git a/.github/workflows/root.yml b/.github/workflows/root.yml index 2983a8e3c90..000f51f13cc 100644 --- a/.github/workflows/root.yml +++ b/.github/workflows/root.yml @@ -31,11 +31,6 @@ jobs: - name: Generate Matrix id: set-matrix run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" "${{ github.head_ref || github.ref_name }}" - - name: Notify Slack - if: failure() - uses: ./.github/actions/notify-slack - with: - token: ${{ secrets.ACTION_MONITORING_SLACK }} NIGHTLY: needs: GENERATE_MATRIX name: ${{ matrix.branch.ref }}