Skip to content

Only publish Docker image on new release #3

Only publish Docker image on new release

Only publish Docker image on new release #3

name: Push OpenSIPS Python Images in Docker Hub
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') # only publish to Docker Hub on tag pushes
steps:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
opensips/python-opensips:latest
opensips/python-opensips:${{ github.ref_name }}