Skip to content

Feature/ici

Feature/ici #43

Workflow file for this run

name: IBM i build CI
on:
push:
branches: [ "main" ]
paths:
- 'ile/**'
pull_request:
branches: [ "main" ]
paths:
- 'ile/**'
env:
remote_build_dir: /home/${{ secrets.IBMI_USER }}/build/${{ github.sha }}
jobs:
build:
runs-on: ubuntu-latest
environment: OSSBUILD
permissions:
packages: read
contents: read
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- run: npm i -g @ibm/ibmi-ci
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Get short SHA ID
run: |
echo "short_sha=$(echo ${{ github.sha }} | head -c 5)" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Deploy to IBM i
run: |
ici \
--cmd "mkdir -p '$remote_build_dir'" \
--rcwd "$remote_build_dir" \
--push "." \
--cmd "/QOpenSys/pkgs/bin/gmake -C ile BUILDLIB=MZNCI$short_sha uninstall all" \
--ignore --cl "dltlib MZNCI$short_sha" \
--ignore --cmd "rm -fr $remote_build_dir"
env:
IBMI_HOST: ${{ secrets.IBMI_HOST }}
IBMI_USER: ${{ secrets.IBMI_USER }}
IBMI_PASSWORD: ${{ secrets.IBMI_PASSWORD }}
IBMI_SSH_PORT: ${{ secrets.IBMI_SSH_PORT }}