Skip to content

Pull image only once. #144

Pull image only once.

Pull image only once. #144

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Alice->SSUT->Bob
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
# branches: [ master ]
pull_request:
# branches: [ master ]
release:
types: [created]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: "30 0 * * *"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
pull_image:
runs-on: ubuntu-latest
env:
RTPP_IMAGE: sippylabs/rtpproxy:latest-ubuntu_latest
steps:
- name: Pull Docker image
run: docker pull ${RTPP_IMAGE}
- name: Save Docker image
run: docker save ${RTPP_IMAGE} -o rtpproxy_latest_ubuntu_latest.tar
- name: Upload Docker image
uses: actions/upload-artifact@v4
with:
name: rtpproxy_latest_ubuntu_latest
path: rtpproxy_latest_ubuntu_latest.tar
# Alice->OpenSIPS->Bob
opensips:
needs: pull_image
uses: ./.github/workflows/.main.yml
with:
mm-type: 'opensips'
mm-branch: ${{ matrix.mm-branch }}
rtppc-type: ${{ matrix.rtppc-type }}
artifact-files: 'opensips.cfg'
strategy:
matrix:
mm-branch: ['master', '3.5', '3.4', '3.3', '3.2']
rtppc-type: ['unix', 'udp', 'udp6', 'tcp', 'tcp6']
include:
- mm-branch: '2.4'
rtppc-type: 'unix'
- mm-branch: '2.4'
rtppc-type: 'udp'
- mm-branch: '2.4'
rtppc-type: 'udp6'
- mm-branch: '3.0'
rtppc-type: 'unix'
- mm-branch: '3.0'
rtppc-type: 'udp'
- mm-branch: '3.0'
rtppc-type: 'udp6'
- mm-branch: '3.1'
rtppc-type: 'unix'
- mm-branch: '3.1'
rtppc-type: 'udp'
- mm-branch: '3.1'
rtppc-type: 'udp6'
# Alice->OpenSIPS(RFC8760)->Bob
opensips_rfc8760:
needs: pull_image
uses: ./.github/workflows/.main.yml
with:
mm-type: 'opensips'
mm-auth: ${{ matrix.mm-auth }}
rtppc-type: ${{ matrix.rtppc-type }}
artifact-files: 'opensips.cfg'
strategy:
matrix:
rtppc-type: ['unix', 'udp', 'udp6', 'tcp', 'tcp6']
mm-auth: ['passtr', 'UAC', 'UAS/auth', 'UAS/auth_db/calculate_ha1', 'UAS/auth_db/ha1']
# Alice->Sippy Python B2B->Bob
sippy_py_b2bua:
if: false
runs-on: ubuntu-latest
container:
image: sippylabs/rtpproxy:latest-ubuntu_latest
options: --privileged
env:
MM_TYPE: b2bua
MM_BRANCH: ${{ matrix.mm-branch }}
RTPP_BRANCH: DOCKER
RTPPC_TYPE: ${{ matrix.rtppc-type }}
strategy:
matrix:
mm-branch: ['wip', 'PRACK']
rtppc-type: ['unix', 'cunix', 'udp', 'udp6', 'tcp', 'tcp6']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13-dev']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Define PYTHON_CMD
run: |
PYTHON_VER="`echo ${{ matrix.python-version }} | sed 's|-dev$||'`"
echo "PYTHON_CMD=python${PYTHON_VER}" >> $GITHUB_ENV
- name: before_install
run: sh -x cibits/before_install.sh
- name: script
run: sh -x ./test_run.sh
- name: Test logs
uses: actions/upload-artifact@v4
with:
name: test-logs_sippy_py_b2bua_${{ matrix.python-version }}_${{ matrix.mm-branch }}_${{ matrix.rtppc-type }}
path: |
b2bua.log
bob.log
alice.log
rtpproxy.log
continue-on-error: true
# Alice->Sippy GO B2B->Bob
sippy_go_b2bua:
if: false
runs-on: ubuntu-latest
container:
image: sippylabs/rtpproxy:latest-ubuntu_latest
options: --privileged
env:
MM_TYPE: go-b2bua
MM_BRANCH: master
RTPP_BRANCH: DOCKER
RTPPC_TYPE: ${{ matrix.rtppc-type }}
python-version: '3.12'
PYTHON_CMD: "python3.12"
strategy:
matrix:
rtppc-type: ['unix', 'cunix', 'udp', 'udp6', 'tcp', 'tcp6']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: before_install
run: sh -x cibits/before_install.sh
- name: script
run: sh -x ./test_run.sh
- name: Test logs
uses: actions/upload-artifact@v4
with:
name: test-logs_sippy_go_b2bua_${{ matrix.rtppc-type }}
path: |
b2bua.log
bob.log
alice.log
rtpproxy.log
continue-on-error: true
# Alice->Kamailio->Bob
kamailio:
if: false
runs-on: ubuntu-latest
container:
image: sippylabs/rtpproxy:latest-ubuntu_latest
options: --privileged
env:
MM_TYPE: kamailio
MM_BRANCH: ${{ matrix.mm-branch }}
RTPP_BRANCH: DOCKER
RTPPC_TYPE: ${{ matrix.rtppc-type }}
python-version: '3.12'
PYTHON_CMD: "python3.12"
strategy:
matrix:
mm-branch: ['master', '5.8', '5.7', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '5.0', '4.4']
rtppc-type: ['unix', 'udp', 'udp6']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: before_install
run: sh -x cibits/before_install.sh
- name: script
run: sh -x ./test_run.sh
- name: Test logs
uses: actions/upload-artifact@v4
with:
name: test-logs_kamailio_${{ matrix.mm-branch }}_${{ matrix.rtppc-type }}
path: |
kamailio.cfg
bob.log
alice.log
rtpproxy.log
continue-on-error: true
publish:
needs: [opensips, opensips_rfc8760, sippy_py_b2bua, sippy_go_b2bua, kamailio]
if: github.event_name == 'release' && github.event.action == 'created'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist
twine upload dist/*