generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 79
45 lines (43 loc) · 1.19 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
name: Test
on:
pull_request_target:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- run: yarn install
- run: |
set -o pipefail
mkdir -p ./pr
echo ${{ github.event.number }} | tee ./pr/number
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "all_result<<$EOF" >> "$GITHUB_ENV"
yarn all >> "$GITHUB_ENV" 2&>1 || true # proceed even if yarn fails
echo >> "$GITHUB_ENV" # yarn all doesn't necessarily produce a newline
echo "$EOF" >> "$GITHUB_ENV"
id: all
- uses: ./
if: ${{ github.event_name == 'pull_request_target' }}
with:
header: All
message: |
<details open>
<summary>output of yarn all</summary>
```
${{ env.all_result }}
```
</details>
- uses: ./
if: ${{ github.event_name == 'pull_request_target' }}
with:
header: All
append: true
hide_details: true
message: |
The build is over.