forked from mastra-ai/mastra
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.37 KB
/
Copy pathbackport-auto.yml
File metadata and controls
49 lines (42 loc) · 1.37 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
name: Backport PRs
permissions:
contents: write
pull-requests: write
on:
pull_request_target:
types: [closed]
branches: [main]
jobs:
backport:
# Only run on the main repository, not on forks
if: |
github.repository == 'mastra-ai/mastra' &&
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'cherry')
runs-on: ubuntu-latest
steps:
- name: Initial checkout
uses: actions/checkout@v5
with:
# Use default GITHUB_TOKEN for initial checkout
# This is needed to access the .github/actions/app-auth action
fetch-depth: 1
persist-credentials: false
- name: Dane App Auth
id: app-auth
uses: ./.github/actions/app-auth
with:
app-id: ${{ vars.DANE_APP_ID }}
private-key: ${{ secrets.DANE_APP_PRIVATE_KEY }}
- name: Re-checkout with app token
uses: actions/checkout@v5
with:
token: ${{ steps.app-auth.outputs.token }}
persist-credentials: true
fetch-depth: 0
- name: Setup pnpm and Node.js
uses: ./.github/actions/setup-pnpm-node
- name: Backport PR
run: pnpm dlx tsx packages/_changeset-cli/src/git/backport.ts ${{ github.event.pull_request.number }}
env:
GITHUB_TOKEN: ${{ steps.app-auth.outputs.token }}