-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (51 loc) · 1.69 KB
/
pr-builder.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
49
50
51
52
53
54
55
56
name: PR Builder
on:
workflow_dispatch:
inputs:
chatroom-url:
description: >
URL of the chatroom you want to add to Sloshy's configuration
required: true
chatroom-desc:
description: Description of the room
required: true
user-url:
description: >
Your Stack Exchange user profile URL
required: true
user-nick:
description: >
The user name for yourself you would like to have included in the code
jobs:
pr-generator:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Check out sources
uses: actions/checkout@v4
- name: Make the requested changes
env:
SLOSHY_EMAIL: ${{secrets.SLOSHY_EMAIL}}
SLOSHY_PASSWORD: ${{secrets.SLOSHY_PASSWORD}}
run: |
pip3 install -r requirements.txt
python3 pr-builder.py '${{ github.event.inputs.chatroom-url}}' \
'${{ github.event.inputs.chatroom-desc}}' \
'${{ github.event.inputs.user-url}}' \
'${{ github.event.inputs.user-nick}}'
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
add-paths:
sloshy.yaml
commit-message: |
${{ github.actor }}: add ${{ github.event.inputs.chatroom-desc }}
PR builder: new entry for ${{ github.event.inputs.chatroom-url }}
title: >
${{ github.actor }}: add ${{ github.event.inputs.chatroom-desc }}
body: >
PR builder: new entry for ${{ github.event.inputs.chatroom-url }}
branch: pr-builder-${{ github.run_id }}-${{ github.run_attempt }}
delete-branch: true