-
Notifications
You must be signed in to change notification settings - Fork 6
78 lines (69 loc) · 2.47 KB
/
daily-cli-tests.yml
File metadata and controls
78 lines (69 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Daily CLI Tests
on:
workflow_dispatch:
schedule:
- cron: "0 9 * * 1,2,3,4,5"
jobs:
set-trail-name:
runs-on: ubuntu-latest
outputs:
trail_name: ${{ steps.prep.outputs.trail_name }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- uses: actions/checkout@v6
- name: Prepare
id: prep
run: |
TRAIL_NAME=$(echo $GITHUB_SHA | head -c 7)
echo "TRAIL_NAME=${TRAIL_NAME}" >> $GITHUB_ENV
echo "trail_name=$TRAIL_NAME" >> $GITHUB_OUTPUT
test:
needs: [set-trail-name]
uses: ./.github/workflows/test.yml
with:
AWS_ACCOUNT_ID: 772819027869
AWS_REGION: eu-central-1
FLOW_NAME: cli-daily-tests
TRAIL_NAME: ${{ needs.set-trail-name.outputs.trail_name }}
KOSLI_ORG: kosli-public
run_lint: false
run_snyk: false
report_to_kosli: 'none'
secrets:
github_access_token: ${{ secrets.KOSLI_GITHUB_TOKEN }}
gitlab_access_token: ${{ secrets.KOSLI_GITLAB_TOKEN }}
azure_access_token: ${{ secrets.KOSLI_AZURE_TOKEN }}
azure_client_id: ${{ secrets.AZURE_CLIENT_ID }}
azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }}
bitbucket_access_token: ${{ secrets.KOSLI_BITBUCKET_ACCESS_TOKEN }}
jira_api_token: ${{ secrets.KOSLI_JIRA_API_TOKEN }}
slack_webhook: ${{ secrets.MERKELY_SLACK_CI_FAILURES_WEBHOOK }}
slack_channel: ci-failures
snyk_token: ${{ secrets.SNYK_TOKEN }}
kosli_reporting_api_token: ${{ secrets.KOSLI_PUBLIC_API_TOKEN }}
kosli_querying_api_token: ${{ secrets.KOSLI_API_TOKEN_PROD }}
sonarqube_token: ${{ secrets.KOSLI_SONARQUBE_TOKEN }}
slack-notification-on-failure:
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
needs:
[
set-trail-name,
test,
]
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') && github.ref == 'refs/heads/main' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit
- name: Slack Notification on Failure
uses: kosli-dev/reusable-actions/.github/actions/send-ci-failure-slack-message@main
with:
slack_url: ${{ secrets.MERKELY_SLACK_CI_FAILURES_WEBHOOK }}
github_token: ${{ secrets.GITHUB_TOKEN }}