mirror of
https://github.com/jambonz/sbc-sip-sidecar.git
synced 2025-12-19 04:27:46 +00:00
51
.github/workflows/docker-publish.yml
vendored
Normal file
51
.github/workflows/docker-publish.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
# Publish `master` as Docker `latest` image.
|
||||
branches:
|
||||
- main
|
||||
|
||||
# Publish `v1.2.3` tags as releases.
|
||||
tags:
|
||||
- v*
|
||||
|
||||
env:
|
||||
IMAGE_NAME: sbc-inbound
|
||||
|
||||
jobs:
|
||||
push:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build image
|
||||
run: docker build . --file Dockerfile --tag $IMAGE_NAME
|
||||
|
||||
- name: Log into registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Push image
|
||||
run: |
|
||||
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
|
||||
|
||||
# Change all uppercase to lowercase
|
||||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||
|
||||
# Strip git ref prefix from version
|
||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
|
||||
# Strip "v" prefix from tag name
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||
|
||||
# Use Docker `latest` tag convention
|
||||
[ "$VERSION" == "main" ] && VERSION=latest
|
||||
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo VERSION=$VERSION
|
||||
|
||||
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
||||
docker push $IMAGE_ID:$VERSION
|
||||
19
.github/workflows/npm-ci.yml
vendored
Normal file
19
.github/workflows/npm-ci.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16.x
|
||||
- run: npm ci
|
||||
- run: npm run jslint
|
||||
- run: npm test
|
||||
|
||||
|
||||
20
package-lock.json
generated
20
package-lock.json
generated
@@ -1,20 +1,20 @@
|
||||
{
|
||||
"name": "sbc-outbound-handler",
|
||||
"name": "sbc-sip-sidecar",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sbc-outbound-handler",
|
||||
"name": "sbc-sip-sidecar",
|
||||
"version": "0.0.1",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@jambonz/db-helpers": "^0.6.18",
|
||||
"@jambonz/http-authenticator": "^0.2.1",
|
||||
"@jambonz/http-authenticator": "^0.2.2",
|
||||
"@jambonz/mw-registrar": "^0.2.2",
|
||||
"@jambonz/realtimedb-helpers": "^0.4.29",
|
||||
"@jambonz/stats-collector": "^0.1.6",
|
||||
"@jambonz/time-series": "^0.1.12",
|
||||
"@jambonz/time-series": "^0.2.0",
|
||||
"debug": "^4.3.4",
|
||||
"drachtio-mw-registration-parser": "^0.1.0",
|
||||
"drachtio-mw-response-time": "^1.0.2",
|
||||
@@ -329,9 +329,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@jambonz/time-series": {
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.1.12.tgz",
|
||||
"integrity": "sha512-TmCG4jcI8oK3NXOc4/PbdRhhMVLEr5FOyG4IIWpNlwB0vbjAGLY3K+O5PF4fXK+UcNYnIrUcrd2C0J9z3+YBxw==",
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.0.tgz",
|
||||
"integrity": "sha512-yuZKZjSU0txB0YDHYuTF9JU5alysD33QbpkI+XxLiWD6Dn0RbGcO1LSDolCP94jDFxqPh3aJbI0/wDsTBYkpaA==",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.1",
|
||||
"influx": "^5.9.3"
|
||||
@@ -3806,9 +3806,9 @@
|
||||
}
|
||||
},
|
||||
"@jambonz/time-series": {
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.1.12.tgz",
|
||||
"integrity": "sha512-TmCG4jcI8oK3NXOc4/PbdRhhMVLEr5FOyG4IIWpNlwB0vbjAGLY3K+O5PF4fXK+UcNYnIrUcrd2C0J9z3+YBxw==",
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.0.tgz",
|
||||
"integrity": "sha512-yuZKZjSU0txB0YDHYuTF9JU5alysD33QbpkI+XxLiWD6Dn0RbGcO1LSDolCP94jDFxqPh3aJbI0/wDsTBYkpaA==",
|
||||
"requires": {
|
||||
"debug": "^4.3.1",
|
||||
"influx": "^5.9.3"
|
||||
|
||||
10
package.json
10
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "sbc-outbound-handler",
|
||||
"name": "sbc-sip-sidecar",
|
||||
"version": "0.0.1",
|
||||
"description": "SBC Outbound Handler",
|
||||
"description": "SBC SIP sidecar app (handles REGISTER and OPTIONS)",
|
||||
"main": "app.js",
|
||||
"engines": {
|
||||
"node": ">= 14.0.0"
|
||||
@@ -28,14 +28,14 @@
|
||||
"homepage": "https://github.com/xquanluu/sbc-outbound-handler#readme",
|
||||
"dependencies": {
|
||||
"@jambonz/db-helpers": "^0.6.18",
|
||||
"@jambonz/http-authenticator": "^0.2.1",
|
||||
"@jambonz/http-authenticator": "^0.2.2",
|
||||
"@jambonz/mw-registrar": "^0.2.2",
|
||||
"@jambonz/realtimedb-helpers": "^0.4.29",
|
||||
"@jambonz/stats-collector": "^0.1.6",
|
||||
"@jambonz/time-series": "^0.1.12",
|
||||
"@jambonz/time-series": "^0.2.0",
|
||||
"debug": "^4.3.4",
|
||||
"drachtio-mw-registration-parser": "^0.1.0",
|
||||
"drachtio-mw-response-time": "^1.0.2",
|
||||
"@jambonz/realtimedb-helpers": "^0.4.29",
|
||||
"drachtio-srf": "^4.5.17",
|
||||
"pino": "^6.14.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user