-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.46 KB
/
ready.yml
File metadata and controls
81 lines (70 loc) · 2.46 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
80
81
name: Ready
# This workflow is triggered by 'ready' branches
on:
workflow_dispatch:
push:
branches:
- "ready/**"
jobs:
trunk-worthy:
name: Check trunk worthyness
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
statuses: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Mark pending
run: ./.scripts/trunk-worthy mark-pending
- name: Set up runner environment
uses: ./.github/actions/prep-runner
with:
verify: ./.scripts/trunk-worthy
# At this point we only duplicated the wrapup flow.
# Add all additional jobs you want to run on the ready branch before the merge-to-trunk job
# and make merge-to-trunk depend on them (like it depends on trunk-worthy) to ensure they run before the merge.
mark-trunk-worthy:
name: Trunk-worthy
runs-on: ubuntu-latest
permissions:
statuses: write
contents: read
needs:
- trunk-worthy
env:
GITHUB_TOKEN: ${{ secrets.READY_PUSHER }}
steps:
- name: Mark trunk-worthy
run: |
set -e
gh ext install lakruzz/gh-set-status
gh set-status success "Is trunk-worthy" trunk-worthy
merge-to-trunk:
name: Merge to trunk
runs-on: ubuntu-latest
needs: trunk-worthy
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
pull-requests: write
issues: write
contents: write
steps:
# Not sue what goes on here? Whre did the secret come from?
# check *./docs/ready-pusher.md' for more details on how to set up and use this workflow
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch full history to ensure we can merge and push
token: ${{ secrets.READY_PUSHER }} # PAT with content:write (can not use secrets.GITHUB_TOKEN as it is a special case, it does not trigger other workflows on push)
- uses: devx-cafe/takt-actions/ready-to-trunk@v1
# with: #Uncomment if you want to override any of the default inputs
# target_branch: #default is main
# user_name: #default is "Ready Pusher Bot"
# user_email: #default is "ready-pusher@${{ github.repository_owner }}.github.com"
# delete_dev_branch: false # default is true
# delete_ready_branch: false # default is true
# close_pr: false # default is true
# close_issue: false # default is true