generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.37 KB
/
test.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
name: Test build
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
# push:
# branches:
# - main
# - 'releases/*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Run all scripts
run: |
INPUT_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run all
get-prs: # make sure we can actually execute the action
needs: build
runs-on: ubuntu-latest
environment: tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get merged pull requests
uses: ./
id: pull_requests
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_limit: 1
- name: Print merged pull requests
env:
PULL_REQUESTS: ${{ steps.pull_requests.outputs.pull_requests }}
run: |
titles=$(jq -r '.[].title' <<<"$PULL_REQUESTS")
if [ -z "$titles" ]; then
echo "No pull requests were merged between the current and previous tag."
else
echo "The following pull requests were merged between the current and previous tag:"
echo "$titles" | while read -r title; do
echo "- $title"
done
fi