From 06a07762a1283193fc1b4e507ecdb8c9808cac44 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 3819200..2feb150 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 @@ -53,7 +55,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 @@ -140,9 +142,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 }}