-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.28 KB
/
factory.yaml
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: PR Factory
on:
workflow_dispatch: {}
schedule:
- cron: "0 */4 * * *"
jobs:
merge-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Merge active change
env:
GH_TOKEN: ${{ secrets.WEN_PAT }}
id: merge
run: javascript/src/season/merge_next
create-pr:
needs: merge-pr
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
- name: run switch season
id: switch
run: javascript/src/season/flip
- name: choose next
id: choose-next
run: |
chmod +x ./.github/workflows/randname.sh
echo "secret_name=WEN_PAT" >> $GITHUB_OUTPUT
./.github/workflows/randname.sh >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets[steps.choose-next.outputs.secret_name] }}
commit-message: Everyone knows its ${{ steps.switch.outputs.season }}
title: ${{ steps.choose-next.outputs.title }} season
body: ${{ steps.switch.outputs.season }} season
labels: ${{ steps.switch.outputs.season }}
branch: eli/season