Publish Docker Image #54
This file contains hidden or 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 Docker Image | |
on: | |
workflow_dispatch: # Allow manual triggering of the workflow | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
asterisk_version: [22, 21] | |
base_version: [9-minimal] | |
enable_chan_sip: [false, true] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: | | |
${{ secrets.DOCKER_USERNAME }}/asterisk-rockylinux:${{ matrix.asterisk_version }}-${{ matrix.base_version }}${{ matrix.enable_chan_sip == true && '-chansip' || '' }} | |
build-args: | | |
ASTERISK_VERSION=${{ matrix.asterisk_version }} | |
BASE_VERSION=${{ matrix.base_version }} | |
ENABLE_CHAN_SIP=${{ matrix.enable_chan_sip == true && 'true' || 'false' }} | |
build-and-push-latest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
enable_chan_sip: [false, true] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Build and push latest | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: | | |
${{ secrets.DOCKER_USERNAME }}/asterisk-rockylinux:latest${{ matrix.enable_chan_sip == true && '-chansip' || '' }} | |
build-args: | | |
ASTERISK_VERSION=latest | |
BASE_VERSION=9-minimal | |
ENABLE_CHAN_SIP=${{ matrix.enable_chan_sip == true && 'true' || 'false' }} |