forked from ERGA-consortium/EARs
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 1.14 KB
/
5_ear_bot_approved.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
name: The EARs Reviewing bot on approved changes
on:
pull_request_review:
types: [submitted]
jobs:
approved-changes:
if: github.event.review.state == 'approved' && (contains(github.event.pull_request.labels.*.name, 'ERGA-BGE') || contains(github.event.pull_request.labels.*.name, 'ERGA-Pilot') || contains(github.event.pull_request.labels.*.name, 'ERGA-Community'))
runs-on: ubuntu-latest
steps:
- uses: jsok/serialize-workflow-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: "main"
persist-credentials: false
- name: Save event data
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
REVIEWER: ${{ github.event.review.user.login }}
should_run: ${{ github.event.review.state == 'approved' }}
run: |
echo "PR_NUMBER=$PR_NUMBER" > pr_status
echo "REVIEWER=$REVIEWER" >> pr_status
echo "SHOULD_RUN=$should_run" >> pr_status
- uses: actions/upload-artifact@v4
with:
path: pr_status
name: pr_status