-
Notifications
You must be signed in to change notification settings - Fork 2.3k
48 lines (47 loc) · 1.32 KB
/
ghstack_land.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
name: Land ghstack PRs
on:
repository_dispatch:
types: [land-command]
jobs:
ghstack_land:
name: ghstack Land
runs-on: ubuntu-latest
steps:
- name: Show Environment Variables
run: env
- name: Show Github Object
run: |
cat <<'EOF'
${{ toJson(github) }}
EOF
- name: Show Github Event Path Json
run: 'cat $GITHUB_EVENT_PATH || true'
- uses: actions/checkout@v3
with:
token: ${{ secrets.GARDENER_PAT }}
fetch-depth: '0'
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Check Current CI Status
run: |
pip install requests ghstack
.github/workflows/scripts/ghstack-perm-check.py <<'EOF'
${{ toJson(github) }}
EOF
env:
GITHUB_TOKEN: ${{ secrets.GARDENER_PAT }}
- name: Land It!
run: |
git config --global user.email "[email protected]"
git config --global user.name "Taichi Gardener"
cat <<EOF > ~/.ghstackrc
[ghstack]
github_url = github.com
github_oauth = $GITHUB_TOKEN
github_username = taichi-gardener
remote_name = origin
EOF
ghstack land "${{ github.event.client_payload.pull_request.html_url }}"
env:
GITHUB_TOKEN: ${{ secrets.GARDENER_PAT }}