Skip to content

migrage github to new run.yml #17

migrage github to new run.yml

migrage github to new run.yml #17

Workflow file for this run

name: Push SIPssert Docker Image in Docker Hub
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set docker-tag variable
run: BRANCH="${GITHUB_REF#refs/heads/}"; echo -e "BRANCH=$BRANCH\nDOCKER_TAG=${BRANCH//main/latest}" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: ./docker
push: true
tags: opensips/sipssert:${{ env.DOCKER_TAG }}