Skip to content

Fix

Fix #197

Workflow file for this run

name: venus
on:
workflow_dispatch:
pull_request:
jobs:
docker:
runs-on: ubuntu-latest
container:
image: victronenergy/venus-docker
options: --cpus 1
steps:
- name: Set BRANCH_NAME from github.ref
id: extract_branch
run: |
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | sed 's/refs\/pull\///' | sed 's/\/merge//')
echo "Extracted branch name is $BRANCH_NAME"
echo "::set-output name=branch::$BRANCH_NAME"
- name: Checkout code
uses: actions/checkout@v3
- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
- name: Install more UNIX tools
run: |
if which apt > /dev/null
then
apt update
apt -y install wget curl cron
elif which opkg > /dev/null
then
opkg install wget
opkg install curl
else
echo "W: Tests limited because of non-avail of wget and curl"
fi
- name: Set script permissions
run: chmod +x ./victron-venus-os-install.sh
- name: Execute Installation under Venus OS
run: |
echo pwd
pwd
echo ls
ls
echo victron-venus-os-install.sh
if ./victron-venus-os-install.sh ; then
echo "[OK]"
else
echo "[FAIL]"
pwd
HEAD_PATH=$(which head)
find . | $HEAD_PATH -n 30
exit 1
fi
env:
NO_REBOOT: 1
DEBUG: 1
BRANCH: ${{ steps.extract_branch.outputs.branch }}
ACTOR: ${{ github.actor }}
- name: Execute Run-Script under Venus OS
run: /data/etc/Spotmarket-Switcher/service/run
env:
DEBUG: 1
- name: Execute Control-Script under Venus OS
run: |
/data/etc/Spotmarket-Switcher/controller.sh
env:
DEBUG: 1