publish to docker hub #3
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: publish to docker hub | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version number for Docker image' | |
required: true | |
tag_name: | |
description: 'Tag to checkout for sipwise/rtpengine (default: master)' | |
required: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build with TAG_NAME | |
run: docker build . --build-arg TAG_NAME=${{ github.event.inputs.tag_name }} -t fonoster/rtpengine:${{ github.event.inputs.version }} | |
- name: Publish | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
name: fonoster/rtpengine | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
workdir: . | |
tags: "latest,${{ github.event.inputs.version }}" | |
platforms: linux/amd64,linux/arm64 |