Update Media Capture Controller Hub #3
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: Update Webcam Controller Hub | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
paths: | |
- '!embodiments/neuraville/javascript_webcam/version.py' | |
- 'embodiments/neuraville/javascript_webcam/**' | |
- 'generate_version.sh' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
if: github.repository == 'feagi/feagi-agent' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update Dockerfile and version | |
run: | | |
cd embodiments/neuraville/javascript_webcam/ | |
if [ -f Dockerfile ]; then | |
sed -e 's|COPY controller.py /root/|COPY controller.py /root/|' \ | |
-e 's|COPY configuration.py /root/|COPY configuration.py /root/|' \ | |
-e 's|COPY version.py /root/|COPY version.py /root/|' \ | |
"Dockerfile" > "NewDockerfile" | |
fi | |
mv NewDockerfile Dockerfile | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: embodiments/neuraville/javascript_webcam | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: neuraville/webcam_controller:latest |