-
Notifications
You must be signed in to change notification settings - Fork 593
63 lines (63 loc) · 2.15 KB
/
buildkite-slash-commands.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
name: BK slash-command
on:
repository_dispatch:
types:
- cdt-command
- ci-repeat-command
- dt-command
- microbench-command
- publish-to-install-pack-command
- rp-unit-test-command
- test-arm64-command
- test-codecov-command
- test-rc-pipeline-command
- test-release-pipeline-command
jobs:
run-build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}
- uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
,sdlc/prod/github/actions_bot_token
,sdlc/prod/github/buildkite_token
parse-json-secrets: true
- uses: actions/checkout@v4
with:
repository: redpanda-data/sparse-checkout
token: ${{ env.ACTIONS_BOT_TOKEN }}
path: sparse-checkout
- uses: ./sparse-checkout
with:
repository: redpanda-data/vtools
token: ${{ env.ACTIONS_BOT_TOKEN }}
patterns: actions
path: ghca
- name: Buildkite slash command action
uses: ./ghca/actions/buildkite-slash-commands
with:
buildkite_token: ${{ env.BUILDKITE_TOKEN }}
buildkite_org: redpanda
buildkite_pipeline: redpanda
command: ${{ github.event.client_payload.slash_command.command }}
- name: Success reaction
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ env.ACTIONS_BOT_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: hooray
- name: Error response
if: failure()
uses: ./ghca/actions/slash-command-error
with:
token: ${{ env.ACTIONS_BOT_TOKEN }}
body: ${{ env.ERROR_MSG }}