-
Notifications
You must be signed in to change notification settings - Fork 13
49 lines (45 loc) · 1.52 KB
/
prepare-release.yml
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
name: Prepare Release
on:
workflow_dispatch:
jobs:
prepare-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Prepare release
env:
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
CI: true
run: |
echo "$GPG_SECRET_KEY" | base64 --decode | gpg --import --no-tty --batch --yes
scripts/release.sh prepare
- name: Notify Slack on Failure
uses: slackapi/slack-github-action@v1.25.0
if: failure()
with:
payload: |
{
"attachments": [
{
"color": "#E92020",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure*\nlw-scanner-action/prepare-release\n*Workflow Run*\n https://github.com/lacework/lw-scanner-action/actions/runs/${{ github.run_id }}"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK