-
Notifications
You must be signed in to change notification settings - Fork 19
60 lines (50 loc) · 1.84 KB
/
pr.yaml
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
name: Source Orbit Impact Report
on:
pull_request:
types: [opened]
jobs:
so-impact:
environment: COMMON1
runs-on: ubuntu-latest
permissions:
packages: read
issues: write
pull-requests: write
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm i -g @ibm/sourceorbit
- run: npm i -g @ibm/ibmi-ci
- name: Generate impact information
run: so -bf imd -l `git diff --name-only origin/main origin/${GITHUB_HEAD_REF}`
- name: Adding markdown
run: cat impact.md >> $GITHUB_STEP_SUMMARY
- name: Post comment
uses: actions/github-script@v5
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 A new change report is available based on this PR being created.\n\n[See summary here.](https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/${{ github.run_id }})'
})
- name: Generate makefile
run: so -bf make -l `git diff --name-only origin/main origin/${GITHUB_HEAD_REF}`
- name: Deploy to IBM i
run: |
ici \
--cmd "mkdir -p './builds/ics_${GITHUB_HEAD_REF}'" \
--rcwd "./builds/ics_${GITHUB_HEAD_REF}" \
--push "." \
--cmd "/QOpenSys/pkgs/bin/gmake LIBL='CMPSYS' BIN_LIB=$(so -bl ${GITHUB_HEAD_REF})"
env:
IBMI_HOST: ${{ secrets.IBMI_HOST }}
IBMI_USER: ${{ secrets.IBMI_USER }}
IBMI_PASSWORD: ${{ secrets.IBMI_PASSWORD }}
IBMI_SSH_PORT: ${{ secrets.IBMI_SSH_PORT }}