Add description and synchronize it with DH. #40
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: Build Docker image | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on all push or pull request events | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
# added using https://github.com/step-security/secure-repo | |
permissions: | |
contents: read | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
Docker: | |
name: Build&Push to DockerHub | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_REPO: sippylabs/webrtc_phone | |
PLATFORMS: linux/amd64,linux/i386,linux/arm/v7,linux/arm64 | |
BASE_IMAGE: sippylabs/rtpproxy:RFC5245_ICE | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Checkout SIP.js repo | |
uses: actions/checkout@v4 | |
with: | |
repository: 'onsip/SIP.js' | |
path: docker/SIP.js | |
- name: Checkout Sippy B2BUA repo | |
uses: actions/checkout@v4 | |
with: | |
repository: 'sippy/b2bua' | |
path: docker/b2bua | |
ref: RFC7118 | |
- name: Build SIP.js | |
run: sh -x build/SIP.js.sh | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64,arm | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.DOCKER_REPO }} | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=ref,event=pr | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=sha | |
- name: Build Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
build-args: BASE_IMAGE=${{ env.BASE_IMAGE }} | |
push: true | |
tags: | | |
${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: ${{ env.PLATFORMS }} | |
- name: Update DockerHub repo description | |
if: true || ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: sh -x docker/update_description.sh README.md |