-
Notifications
You must be signed in to change notification settings - Fork 57
46 lines (41 loc) · 1.32 KB
/
embeds.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
name: 'YAML Checker'
on:
pull_request:
types: [ 'opened', 'reopened', 'synchronize' ]
pull_request_target:
types: [ 'opened', 'reopened', 'synchronize' ]
draft: false
jobs:
check_code:
runs-on: 'ubuntu-latest'
steps:
- name: 'Clone Repository'
uses: 'actions/checkout@v2'
- name: 'Install Java'
uses: 'actions/[email protected]'
with:
distribution: 'adopt'
java-version: '17'
check-latest: false
- name: 'Verify embeds.yml'
id: 'verify'
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "results<<$EOF" >> $GITHUB_ENV
java -jar .github/workflows/embeds.jar embeds.yml >> $GITHUB_ENV
echo "$EOF" >> $GITHUB_ENV
- name: 'Find Comment'
uses: 'peter-evans/find-comment@v2'
id: 'fc'
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'YAML Checker'
- name: 'Create Review'
uses: 'peter-evans/create-or-update-comment@v3'
with:
edit-mode: 'replace'
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
${{ env.results }}