Skip to content

Adding New Action Scripts

How to add action scripts manually

  1. Add new action metadata to online_assets spreadsheet
  2. Create audio files necessary for the action
  3. Create a python script that references these files in the proper remote path
  4. Add audio file paths to the perfect_state_robots spreadsheet
  5. Update perfect state file on the online app server (in static files)
  6. Upload audio files to the correct path on the online app server into static files
  7. Add the action via AR Online admin dashboard based on the metadata from step 1 (but the script path should be like in NAO MS; i.e. something like kk/povar/povar.py)
  8. Launch the cloud sync process on the offline app
  9. Launch the robot sync process on the offline app

How it should work in the future

Admins should be able to upload script files directly through AR Online frontend, from which corresponding MS will be semi-automatically updated (via GH workflows).

    sequenceDiagram
   participant Admin / Developer
   participant OnlineApp
   participant Server
   participant GitHub
   participant GitRunner
   participant GHCR


   Admin / Developer->>OnlineApp: Creates new Action, uploads action script and audio files via UI
   OnlineApp->>Server: Saves audio files to RFs folder, script file to private folder


   Note over Admin / Developer,GitHub: Admin triggers workflow manually (workflow_dispatch) on the MS repo?

   Admin / Developer->>GitHub: Manually triggers workflow_dispatch
   GitHub->>GitRunner: Starts CI/CD workflow
   GitRunner->>Server: Executes scp to download the script file
   GitRunner->>GitRunner: Saves the script file into MS repo action scripts folder


   GitRunner->>GitRunner: Builds new MS Docker image with files
   GitRunner->>GHCR: Pushes image to registry