Skip to content

Commit

Permalink
feat(): automatically trigger CI every monday,wednesday and friday at…
Browse files Browse the repository at this point in the history
… 5am, notify if failed
  • Loading branch information
Skraye committed Aug 7, 2024
1 parent 98e9f36 commit 29710ac
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Main

on:
schedule:
- cron: '0 4 * * 1,3,5'
push:
branches:
- master
Expand Down Expand Up @@ -58,7 +60,7 @@ jobs:
run: |
echo $GOOGLE_SERVICE_ACCOUNT | base64 -d > ~/.gcp-service-account.json
export GOOGLE_APPLICATION_CREDENTIALS=$HOME/.gcp-service-account.json
./gradlew check
./gradlew check -refresh-dependencies
# Allure check
- name: Auth to Google Cloud
Expand Down Expand Up @@ -145,9 +147,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 }}

0 comments on commit 29710ac

Please sign in to comment.