-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (53 loc) · 1.38 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
50
51
52
53
54
55
56
57
58
59
60
name: PR Factory
on:
workflow_dispatch: {}
schedule:
- cron: "0/30 * * * *"
jobs:
create-pr:
# needs: merge-pr
runs-on: [ubicloud]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
- name: choose secret
id: choose-secret
run: |
case $(( RANDOM % 3 )) in
0)
echo "secret_name=ELI_PAT" >> $GITHUB_OUTPUT
echo "Impersonating Eli"
;;
1)
echo "secret_name=ELI_PAT" >> $GITHUB_OUTPUT
echo "Impersonating Eli"
;;
2)
echo "secret_name=ELI_PAT" >> $GITHUB_OUTPUT
echo "Impersonating Eli"
;;
esac
- name: trunk install
uses: trunk-io/trunk-action/install@v1
with:
tools: gh
- uses: robinraju/[email protected]
with:
repository: trunk-io/mergequeue-tool
latest: true
tarBall: true
preRelease: false
extract: true
- name: run mq
id: edits
run: ./mq generate
env:
GH_TOKEN: ${{ secrets[steps.choose-secret.outputs.secret_name] }}
- name: run mq
if: always()
id: clean
run: ./mq housekeeping
env:
GH_TOKEN: ${{ secrets[steps.choose-secret.outputs.secret_name] }}