-
Notifications
You must be signed in to change notification settings - Fork 63
51 lines (43 loc) · 1.74 KB
/
docs.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
name: "Flag the error message changes and label the PR"
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * 5'
pull_request:
branches: [ v2.x.x, v3.x.x ]
env:
JOB_ID: ${{ github.run_id }}-${{ github.run_number }}
jobs:
analyze:
name: Identify and generate changes in the Error messages
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Generate and compare the Error messages
run: |
git clone https://zowe-robot:${{ secrets.ZOWE_ROBOT_TOKEN }}@github.com/zowe/docs-site.git
cd docs-site
git checkout v3-doc-branch
cd ../docs/docgen/
java -jar Docgen-1.0.jar ./config.yml
cp ../../docs-site/docs/troubleshoot/troubleshoot-apiml-error-codes.md original-codes.md
cd ../../docs-site/
git config --global user.email "zowe-robot@users.noreply.github.com"
git config --global user.name "Zowe Robot"
cd ../scripts/docs
npm install
node index.js zowe api-layer ${{ secrets.ZOWE_ROBOT_TOKEN }}
- name: Store results
uses: actions/upload-artifact@v2
with:
name: ErrorMessage-${{ env.JOB_ID }}
path: |
docs/docgen/ErrorMessagesDocumentation.md