From 6ca7fba76482e711d47d4863b28f68c5bf23689b Mon Sep 17 00:00:00 2001 From: YannC Date: Wed, 7 Aug 2024 13:35:19 +0200 Subject: [PATCH] feat(): automatically trigger CI every monday,wednesday and friday at 5am, notify if failed --- .github/workflows/main.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 73d735e..c67ccad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,8 @@ name: Main on: + schedule: + - cron: '0 4 * * 1,3,5' push: branches: - master @@ -62,7 +64,7 @@ jobs: # Gradle check - name: Build with Gradle if: ${{ github.event.inputs.skip-test == 'false' || github.event.inputs.skip-test == '' }} - run: ./gradlew check + run: ./gradlew check -refresh-dependencies # Allure check - name: Auth to Google Cloud @@ -149,9 +151,17 @@ jobs: status: ${{ job.status }} job_name: Check & Publish fields: repo,message,commit,author,action,eventName,ref,workflow,job,took - username: GitHub Actions + username: Github Actions icon_emoji: ':github-actions:' channel: 'C02DQ1A7JLR' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Notify failed CI + id: send-ci-failed + if: always() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && job.status != 'success' + uses: kestra-io/actions/.github/actions/send-ci-failed@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}