Dev #256
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
id: set_branch | |
run: echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV | |
- 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 "BRANCH = ${{ env.BRANCH_NAME }}" | |
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: ${{ env.BRANCH_NAME }} | |
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: | | |
bash scripts/controller.sh #/data/etc/Spotmarket-Switcher/controller.sh | |
env: | |
DEBUG: 1 | |
CONFIG: sample.config.txt |