Skip to content

Commit 542352c

Browse files
committed
ci: add RTC auto-pay on PR merge
1 parent 784a474 commit 542352c

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/auto-pay.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: RTC Auto-Pay on PR Merge
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
permissions:
8+
pull-requests: write
9+
issues: read
10+
11+
jobs:
12+
auto-pay:
13+
# Only run when PR is actually merged, not just closed
14+
if: github.event.pull_request.merged == true
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 5
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.11"
26+
27+
- name: Install dependencies
28+
run: pip install requests
29+
30+
- name: Run RTC Auto-Pay
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
PR_NUMBER: ${{ github.event.pull_request.number }}
34+
REPO: ${{ github.repository }}
35+
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
36+
RTC_VPS_HOST: ${{ secrets.RTC_VPS_HOST }}
37+
RTC_ADMIN_KEY: ${{ secrets.RTC_ADMIN_KEY }}
38+
REPO_OWNER: ${{ github.repository_owner }}
39+
run: python scripts/auto-pay.py

0 commit comments

Comments
 (0)