Skip to content

actions: provide branch when dispatching #13

actions: provide branch when dispatching

actions: provide branch when dispatching #13

name: Trigger OpenSIPS Control Panel Docker Image build and publish
on:
push:
repository_dispatch:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set docker-tag variable
run: BRANCH="${GITHUB_REF#refs/heads/}"; echo -e "BRANCH=$BRANCH\nDOCKER_TAG=${BRANCH//master/latest}" >> $GITHUB_ENV
- name: Repository Dispatch
uses: myrotvorets/[email protected]
with:
token: ${{ secrets.DOCKER_OPENSIPS_CLI_PAT }}
repo: OpenSIPS/docker-opensips-cp
type: OpenSIPS CP trigger
payload: '{"docker_tag": "${{ env.DOCKER_TAG }}", "branch": "${{ env.BRANCH}}"}'