-
Notifications
You must be signed in to change notification settings - Fork 417
79 lines (77 loc) · 2.74 KB
/
repository-dispatch.yml
File metadata and controls
79 lines (77 loc) · 2.74 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
79
---
name: Repository dispatch on push or release
on:
push:
paths:
- "frontend/**"
- "backend/**"
- "Taskfile.yaml"
- "taskfiles/**"
- '.github/workflows/repository-dispatch.yml'
- '.github/workflows/backend-lint-test.yml'
- '.github/workflows/frontend-verify.yml'
- 'test-images.json'
tags:
- '*'
branches:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
statuses: write
jobs:
backend-verify:
uses: ./.github/workflows/backend-lint-test.yml
permissions:
contents: read
frontend-verify:
uses: ./.github/workflows/frontend-verify.yml
permissions:
contents: read
dispatch:
needs: [backend-verify, frontend-verify]
if: "!failure() && !cancelled()"
runs-on: blacksmith-2vcpu-ubuntu-2404
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
parse-json-secrets: true
- name: Repository Dispatch on Release
uses: peter-evans/repository-dispatch@caebe2a7c967e9f927ff8780fea8e16e50b5ce40
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
token: ${{ env.ACTIONS_BOT_TOKEN }}
repository: redpanda-data/console-enterprise
event-type: release
client-payload: '{"branch": "master", "commit_sha": "${{ github.sha }}", "tag_name": "${{ github.event.release.tag_name }}"}'
- name: Repository Dispatch on push
uses: peter-evans/repository-dispatch@caebe2a7c967e9f927ff8780fea8e16e50b5ce40
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
token: ${{ env.ACTIONS_BOT_TOKEN }}
repository: redpanda-data/console-enterprise
event-type: push
client-payload: '{"branch": "${{ github.ref_name }}", "commit_sha": "${{ github.sha }}"}'
- name: Set pending enterprise CI status
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/github-script@v7
with:
github-token: ${{ env.ACTIONS_BOT_TOKEN }}
script: |
await github.rest.repos.createCommitStatus({
owner: 'redpanda-data',
repo: 'console',
sha: context.sha,
state: 'pending',
description: 'Enterprise CI is running...',
context: 'Enterprise CI'
});