forked from up-for-grabs/up-for-grabs.net
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.27 KB
/
review-project-changes.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
on:
pull_request_target:
types: [opened, synchronize]
name: Review
jobs:
reviewProjectChanges:
name: Project Changes
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout base branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Setup Ruby
uses: ruby/setup-ruby@7bae1d00b5db9166f4f0fc47985a3a5702cb58f0
with:
bundler-cache: true
- name: Run script to review changed projects
id: run_script
run: |
MESSAGE=$(bundle exec ruby scripts/review_changes.rb)
echo 'message<<EOF' >> "$GITHUB_OUTPUT"
echo "$MESSAGE" >> "$GITHUB_OUTPUT"
echo 'EOF' >> "$GITHUB_OUTPUT"
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
GIT_REMOTE_URL: ${{ github.event.pull_request.head.repo.clone_url }}
GITHUB_TOKEN: ${{ secrets.SHIFTBOT_TOKEN }}
- uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
message: ${{ steps.run_script.outputs.message }}
GITHUB_TOKEN: ${{ secrets.SHIFTBOT_TOKEN }}