Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added github actions for dependabot and docker build #39

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
10 changes: 10 additions & 0 deletions .github/workflows/commit-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Commit Issue Commenter
on: push
jobs:
checkCommit:
name: Comment From Commit
runs-on: ubuntu-latest
steps:
- uses: adamzolyak/commit-issue-commenter-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Dependency Review'
on: [pull_request]
permissions: write-all

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
21 changes: 21 additions & 0 deletions .github/workflows/docker-pr-clean-up.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Docker PR Clean Up'
permissions:
packages: write

on:
pull_request:
types: [closed]

jobs:
purge-image:
name: Delete image from ghcr.io
runs-on: ubuntu-latest
steps:
- name: Prune
uses: vlaurin/action-ghcr-prune@main
with:
token: ${{ secrets.PACKAGES_TOKEN }}
container: ${{ github.event.repository.name }}
dry-run: false
tag-regex: pr-${{github.event.pull_request.number}}
untagged: true
111 changes: 111 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Docker Build and Publish
permissions:
packages: write
contents: read

on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
branches:
- master

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta ghcr
id: meta-ghcr
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository }}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=edge,branch=master
-
name: Docker meta DockerHub
id: meta-dockerhub
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
${{ github.repository }}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=edge,branch=master
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push ghcr
uses: docker/build-push-action@v3
with:
context: .
# Due to build time, only building the one currently needed.
# If needed, we can add more platforms when requested.
platforms: "linux/amd64"
# Do not push pull requests
#push: ${{ github.event_name != 'pull_request' }}
# Push pull requests so they can be tested
push: true
tags: ${{ steps.meta-ghcr.outputs.tags }}
labels: ${{ steps.meta-ghcr.outputs.labels }}
-
name: Build and push DockerHub
uses: docker/build-push-action@v3
if: github.event_name != 'pull_request'
with:
context: .
# Due to build time, only building the one currently needed.
# If needed, we can add more platforms when requested.
platforms: "linux/amd64"
# Do not push pull requests
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta-dockerhub.outputs.tags }}
labels: ${{ steps.meta-dockerhub.outputs.labels }}
-
name: push README to Dockerhub
uses: christian-korneck/update-container-description-action@v1
if: github.event_name != 'pull_request'
env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
with:
destination_container_repo: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
provider: dockerhub
short_description: 'Docker with telegraf setup for Synology. Needs external Influx and Grafana.'
readme_file: 'README.md'
71 changes: 71 additions & 0 deletions .github/workflows/release-please-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Create Releases From Branches
permissions: write-all

on:
push:
branches:
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- releases/v[0-9]+
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
id: extract_branch

- uses: GoogleCloudPlatform/[email protected]
id: release
with:
release-type: simple
default-branch: ${{ steps.extract_branch.outputs.branch }}
token: "${{ secrets.PACKAGES_TOKEN }}"

- uses: actions/checkout@v2
with:
fetch-depth: '0'

- name: Tag major and patch versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.PACKAGES_TOKEN}}@github.com/google-github-actions/release-please-action.git"
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

- name: Recreate latest tags for release ordering
if: ${{ steps.release.outputs.release_created }}
id: recreate-latest-tags
run: |
git fetch -avtf
LATEST="$(git tag -l|tail -1)"
LATEST_MAJOR="$(git tag -l|tail -1|awk -F"." '{print $1}')"
LATEST_MINOR="$(git tag -l|tail -1|awk -F"." '{print $1"."$2}')"
git checkout main
git tag -d "${LATEST}"
git tag -d "${LATEST_MAJOR}"
git tag -d "${LATEST_MINOR}"
git push origin :"${LATEST}"
git push origin :"${LATEST_MAJOR}"
git push origin :"${LATEST_MINOR}"
git tag -a "${LATEST}" -m "Release ${LATEST}"
git tag -a "${LATEST_MAJOR}" -m "Release ${LATEST_MAJOR}"
git tag -a "${LATEST_MINOR}" -m "Release ${LATEST_MINOR}"
git push origin "${LATEST}"
git push origin "${LATEST_MAJOR}"
git push origin "${LATEST_MINOR}"
echo "::set-output name=LATEST_RELEASE::${LATEST}"

- name: Publish release on GitHub
if: ${{ steps.release.outputs.release_created }}
uses: test-room-7/action-publish-release-drafts@v0
with:
tag-name: ${{ steps.recreate-latest-tags.outputs.LATEST_RELEASE }}
41 changes: 41 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create Releases From Default Branch
permissions: write-all

on:
push:
branches:
- master
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/[email protected]
id: release
with:
token: "${{ secrets.PACKAGES_TOKEN }}"
release-type: simple

- uses: actions/checkout@v2

- name: Create major branch and tag also patch tag versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.PACKAGES_TOKEN}}@github.com/google-github-actions/release-please-action.git"
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
OLD_MAJOR="$( echo ${{ steps.release.outputs.major }} - 1 | bc )"
if ! git branch -r | grep "releases/v${OLD_MAJOR}"; then
git fetch -avt
if git tag -l | grep -x "^v${OLD_MAJOR}"; then
git branch releases/v${OLD_MAJOR} v${OLD_MAJOR}
git push origin releases/v${OLD_MAJOR}
fi
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ npm-debug.log

# cache
.cache
.vercel
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

## [2.0.1](https://github.com/Gibby/talk/compare/v2.0.0...v2.0.1) (2023-11-07)


### Bug Fixes

* Changes from upstream ([#12](https://github.com/Gibby/talk/issues/12)) ([3deea52](https://github.com/Gibby/talk/commit/3deea52bb1367daa496343e8713aadd531a3ccee))
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
FROM node:latest
#FROM node:latest
FROM node:lts-alpine

WORKDIR /usr/src/app
COPY package.json .
RUN npm install

COPY . .

RUN npm install

EXPOSE 3000

CMD [ "npm", "start" ]
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Talk

## A free group video call app with screen sharing.
## A free, p2p, group video call app for the web. No signups. No downloads. Works in all major browsers.

It is built using WebRTC, so all your video, audio & text chat is peer-to-peer. Group video call is achieved using WebRTC mesh. So the quality of the call is inversely proportional to the number of people on the call. The sweet number is somewhere around 6 to 8 people in an average high-speed connection.
Talk is built using WebRTC, so all your video, audio & text chat is peer-to-peer. Group video call is achieved using WebRTC mesh. So the quality of the call is inversely proportional to the number of people on the call. The sweet number is somewhere around 6 to 8 people in an average high-speed connection.

---

### Prerequisites:

Expand All @@ -13,19 +15,19 @@ It is built using WebRTC, so all your video, audio & text chat is peer-to-peer.

[Fork this repo](https://github.com/vasanthv/talk/fork) and then clone it:

```
```bash
git clone https://github.com/<your_name>/talk.git
```

`cd talk` and then install dependencies

```
```bash
npm install
```

Run the app

```
```bash
npm start
```

Expand Down
Binary file added assets/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/videoOff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading