Skip to content

Merge pull request #57 from alberto-abarzua/chore/rename_managepy #52

Merge pull request #57 from alberto-abarzua/chore/rename_managepy

Merge pull request #57 from alberto-abarzua/chore/rename_managepy #52

Workflow file for this run

name: Frontend CI
on:
push:
paths:
- 'frontend/**'
- 'unity_arm_simulation/**'
workflow_dispatch:
jobs:
build-lint:
runs-on: ubuntu-latest
environment: general
env:
ESP_CONTROLLER_SERVER_PORT: ${{ vars.ESP_CONTROLLER_SERVER_PORT }}
ESP_CONTROLLER_SERVER_HOST: ${{ vars.ESP_CONTROLLER_SERVER_HOST }}
ESP_WIFI_SSID: ${{ vars.ESP_WIFI_SSID }}
ESP_WIFI_PASSWORD: ${{ vars.ESP_WIFI_PASSWORD }}
CONTROLLER_WEBSOCKET_PORT: ${{ vars.CONTROLLER_WEBSOCKET_PORT }}
CONTROLLER_SERVER_PORT: ${{ vars.CONTROLLER_SERVER_PORT }}
BACKEND_HTTP_PORT: ${{ vars.BACKEND_HTTP_PORT }}
NEXT_PUBLIC_BACKEND_URL: ${{ vars.NEXT_PUBLIC_BACKEND_URL }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set Env File
run: printenv | grep -v "^\(PWD\|SHLVL\|HOME\)" > .env
- name: Install toml
run: pip install toml
- name: Build frontend container
run: ./ribot.py build --container frontend
- name: Build Unity Webgl
run: ./ribot.py build --container unity_webgl_server
- name: Lint Frontend
run: ./ribot.py lint --container frontend
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Frontend Container
if: github.ref == 'refs/heads/main'
run: ./ribot.py docker-compose --container frontend --op push
- name: Push Unity Webgl Container
if: github.ref == 'refs/heads/main'
run: ./ribot.py docker-compose --container unity_webgl_server --op push
- name: Stop and remove containers
if: always()
run: ./ribot.py down --container frontend