-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (59 loc) · 1.75 KB
/
validate.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
54
55
56
57
58
59
60
61
62
63
64
name: Validate
run-name: 1.0.0.${{ github.run_number }}
on:
pull_request:
branches:
- master
permissions:
contents: write
pull-requests: write
issues: write
env:
_IS_BUILD_CANARY: false
_IS_GITHUB_RELEASE: false
_RELEASE_NAME: JunctionVIIICatalogs
_RELEASE_VERSION: v0
_BUILD_BRANCH: "${{ github.ref }}"
_BUILD_VERSION: "1.0.0.${{ github.run_number }}"
GIT_REDIRECT_STDERR: 2>&1
jobs:
CI:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 1440
strategy:
max-parallel: 1
steps:
- name: Set Git Config
run: |
git config --global core.autocrlf false
git config --global core.filemode false
git config --global core.longpaths true
- name: Checkout
uses: actions/[email protected]
- name: Install xmllint
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
- name: Set execute permission for prepare.sh
run: chmod +x .github/workflows/prepare.sh
- name: Prepare Env
run: .github/workflows/prepare.sh
shell: bash
- name: Set execute permission for validate.sh
run: chmod +x .github/workflows/validate.sh
- name: Run Validation
run: .github/workflows/validate.sh
- name: Post warnings as PR comment
if: always()
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const output = fs.readFileSync('validation_results.md', 'utf8');
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: output
});