Skip to content

Commit

Permalink
ci: add action for demos (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
genaris authored Sep 23, 2024
1 parent 026cf4a commit 79e592a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Continuous Deployment - Demos

on:
workflow_dispatch:
inputs:
image-tag:
type: string
description: Tag for the image to be published (e.g. 'dev', 'latest', 'v1.0')
env:
DH_USERNAME: ${{secrets.DOCKER_HUB_LOGIN}}
DH_TOKEN: ${{secrets.DOCKER_HUB_PWD}}
jobs:
build-and-push-pymediasoup-client:
name: Build and push Pymediasoup client docker image
runs-on: ubuntu-latest
env:
IMAGE_NAME: 'webrtc-pymediasoup-client-demo'
IMAGE_TAG: ${{ github.event.inputs.image-tag }}
steps:
- name: Checkout webrtc-server
uses: actions/checkout@v4

- name: Log in to Docker Hub
run: |
echo "$DH_TOKEN" | docker login -u "$DH_USERNAME" --password-stdin
- name: Build Docker image
run: |
docker build -f demo/pymediasoup-client/Dockerfile -t $DH_USERNAME/$IMAGE_NAME:$IMAGE_TAG ./demo/pymediasoup-client
- name: Add tags to Docker image and push to Docker Hub
run: |
docker push $DH_USERNAME/$IMAGE_NAME:$IMAGE_TAG

0 comments on commit 79e592a

Please sign in to comment.