forked from bioconda/bioconda-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (127 loc) · 4.49 KB
/
CommentResponder.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: CommentResponder
on:
status:
# check_suite:
# types:
# - completed
issue_comment:
types:
- created
# Runs too many times
# (
# github.event_name == 'check_suite' &&
# github.event.check_suite.conclusion == 'success'
# ) ||
jobs:
comment:
runs-on: ubuntu-latest
name: bioconda-bot comment
if: >-
(
github.event_name == 'status' &&
github.event.state == 'success'
) ||
(
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
(
startsWith(github.event.comment.body, '@bioconda-bot') ||
startsWith(github.event.comment.body, '@biocondabot')
) &&
! contains(github.event.comment.body, 'please merge') &&
! contains(github.event.comment.body, 'please change visibility') &&
! contains(github.event.comment.body, 'please update')
)
container:
image: 'quay.io/bioconda/bot:comment'
steps:
- name: bioconda-bot comment
env:
BOT_TOKEN: ${{ secrets.GITHUBTOKEN }}
GITTER_TOKEN: ${{ secrets.GITTER_TOKEN }}
JOB_CONTEXT: ${{ toJson(github) }}
run: bioconda-bot comment
repost:
runs-on: ubuntu-latest
name: bioconda-bot repost
if: >-
(
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
! (
startsWith(github.event.comment.body, '@bioconda-bot') ||
startsWith(github.event.comment.body, '@biocondabot')
) &&
contains(github.event.comment.body, '@bioconda/')
)
container:
image: 'quay.io/bioconda/bot:comment'
steps:
- name: bioconda-bot comment
env:
BOT_TOKEN: ${{ secrets.GITHUBTOKEN }}
JOB_CONTEXT: ${{ toJson(github) }}
run: bioconda-bot comment
merge:
runs-on: ubuntu-latest
name: bioconda-bot merge
if: >-
(
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
(
startsWith(github.event.comment.body, '@bioconda-bot') ||
startsWith(github.event.comment.body, '@biocondabot')
) &&
contains(github.event.comment.body, 'please merge') &&
! contains(github.event.comment.body, 'please update')
)
container:
image: 'quay.io/bioconda/bot:merge'
steps:
- name: Comment with deprecation info
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
The "please merge" bot command is deprecated. Just hit the merge button
for merging the PR.
update:
runs-on: ubuntu-latest
name: bioconda-bot update
if: >-
(
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
(
startsWith(github.event.comment.body, '@bioconda-bot') ||
startsWith(github.event.comment.body, '@biocondabot')
) &&
! contains(github.event.comment.body, 'please merge') &&
contains(github.event.comment.body, 'please update')
)
container:
image: 'quay.io/bioconda/bot:update'
steps:
- name: Setup ssh (pre)
run: |
cp /usr/local/lib/libstdc++.so* /lib/x86_64-linux-gnu/
- name: Setup ssh
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Setup ssh (post)
run: |
mkdir -p /root/.ssh
# https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
ssh-keygen -R github.com || true
printf '%s\n' \
'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl' \
'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' \
>> /root/.ssh/known_hosts
- name: bioconda-bot update
env:
BOT_TOKEN: ${{ secrets.GITHUBTOKEN }}
CODE_SIGNING_KEY: ${{ secrets.CODE_SIGNING_KEY }}
JOB_CONTEXT: ${{ toJson(github) }}
run: bioconda-bot update