[CI] Add concurrency & remove slack alert (#19237)

* Remove CI's slack report

* Add concurrency to per branch

* Dynamic cancel-in-progress
This commit is contained in:
Mac Siri 2023-03-20 08:59:14 -04:00 committed by GitHub
parent 7d2d71de68
commit 047a68cc66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,10 @@ on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'main' }}
env:
COVERAGE: true
RAILS_ENV: test
@ -391,15 +395,6 @@ jobs:
with:
jobs: ${{ toJSON(needs) }}
- name: Report failure to Slack channel
uses: slackapi/slack-github-action@v1
with:
payload: |
{ "link": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" }
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure() && github.ref == 'refs/heads/main'
deploy:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest