-
Notifications
You must be signed in to change notification settings - Fork 56
40 lines (38 loc) · 1.17 KB
/
cron.yaml
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
name: Cron / Verify
on:
schedule:
- cron: "0 */12 * * *"
jobs:
verify-thumbprint:
name: Verify the thumbprint
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github
- run: aws sts get-caller-identity
- if: ${{ failure() }}
name: Send a notification to Slack
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
payload: |
{
"text": "${{ github.event.repository.name }}: ${{ job.status }}\n${{ github.event.head_commit.url }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ github.event.repository.name }}: ${{ job.status }}\n${{ github.event.head_commit.url }}"
}
}
]
}