Skip to content

build docker image

build docker image #23

Workflow file for this run

name: build docker image
on:
workflow_dispatch:
inputs:
tag:
description: 'build tag prefix to build into docker image'
required: true
default: 'trunk'
type: string
workflow_call:
inputs:
tag:
description: 'build tag prefix to build into docker image'
required: true
default: 'trunk'
type: string
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
BRANCH_TAG: ${{ github.ref_name == 'master' && 'latest' || github.ref_name }}
jobs:
docker-build:
runs-on: ubuntu-20.04
steps:
- name: install new fuse-overlayfs
run: |
sudo dpkg-divert --local --rename /usr/bin/fuse-overlayfs && \
curl -L https://github.com/containers/fuse-overlayfs/releases/download/v1.12/fuse-overlayfs-x86_64 -o /tmp/fuse-overlayfs && \
sudo mv /tmp/fuse-overlayfs /usr/local/bin && \
sudo chmod a+x /usr/local/bin/fuse-overlayfs
- name: Checkout source
uses: actions/checkout@v2
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Build all with buildah
run: |
mkdir -p client-out &&
buildah --version && \
make OPTSFILE=gha TAG=${{ inputs.tag }}
- name: Log in to the Container registry
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish image
run: podman push as-docker:latest ${{ env.REGISTRY }}/srd424/audioserve-docker:${{ env.BRANCH_TAG }}
- name: Add version tag
if: ${{ startsWith(inputs.tag,'v') }}
run: podman push as-docker:latest ${{ env.REGISTRY }}/srd424/audioserve-docker:${{ inputs.tag }}
# vim: set ts=2 et: