-
Notifications
You must be signed in to change notification settings - Fork 4k
74 lines (70 loc) · 2.42 KB
/
repo-sync.yml
File metadata and controls
74 lines (70 loc) · 2.42 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
name: Repo Sync
on:
push:
branches: [master]
pull_request:
types: [closed, opened, synchronize, edited, labeled]
branches: [master]
workflow_dispatch:
inputs:
action:
description: "Which action to run"
required: true
type: choice
options: [sync, escalation]
jobs:
sync:
if: github.event_name == 'push' || inputs.action == 'sync'
uses: warpdotdev/repo-sync/.github/workflows/sync.yml@main
with:
repo_sync_ref: main
app_id: ${{ vars.REPO_SYNC_APP_ID }}
public_repo: warpdotdev/warp
private_repo: warpdotdev/warp-internal
secrets:
app_private_key: ${{ secrets.REPO_SYNC_APP_PRIVATE_KEY }}
warp_api_key: ${{ secrets.WARP_API_KEY }}
restack:
# Run the restack workflow on PRs for `repo-sync/`-prefixed branches
# when they merge or are labelled with `repo-sync:needs-restack`.
if: >-
github.event_name == 'pull_request' &&
startsWith(github.event.pull_request.head.ref, 'repo-sync/') &&
(
github.event.pull_request.merged == true ||
(github.event.action == 'labeled' && github.event.label.name == 'repo-sync:needs-restack')
)
uses: warpdotdev/repo-sync/.github/workflows/restack.yml@main
with:
repo_sync_ref: main
app_id: ${{ vars.REPO_SYNC_APP_ID }}
public_repo: warpdotdev/warp
private_repo: warpdotdev/warp-internal
secrets:
app_private_key: ${{ secrets.REPO_SYNC_APP_PRIVATE_KEY }}
warp_api_key: ${{ secrets.WARP_API_KEY }}
approve:
if: >-
github.event_name == 'pull_request' &&
github.event.action != 'closed' &&
startsWith(github.event.pull_request.head.ref, 'repo-sync/')
uses: warpdotdev/repo-sync/.github/workflows/approve.yml@main
with:
repo_sync_ref: main
approver_app_id: ${{ vars.REPO_SYNC_APPROVER_APP_ID }}
public_repo: warpdotdev/warp
private_repo: warpdotdev/warp-internal
secrets:
approver_app_private_key: ${{ secrets.REPO_SYNC_APPROVER_APP_PRIVATE_KEY }}
escalation:
if: inputs.action == 'escalation'
uses: warpdotdev/repo-sync/.github/workflows/escalation.yml@main
with:
repo_sync_ref: main
app_id: ${{ vars.REPO_SYNC_APP_ID }}
public_repo: warpdotdev/warp
private_repo: warpdotdev/warp-internal
escalate_to: "@oncall-client-primary"
escalate_after: "30m"
secrets:
app_private_key: ${{ secrets.REPO_SYNC_APP_PRIVATE_KEY }}