Skip to content

email. Added copy to clipboard on email #1233

email. Added copy to clipboard on email

email. Added copy to clipboard on email #1233

Workflow file for this run

name: "Build and publish image"
on:
workflow_dispatch:
push:
permissions:
packages: write
jobs:
publish_images:
name: 'Build and publish image'
runs-on: ubuntu-latest
env:
REPOBASE: ghcr.io/${{ github.repository_owner }}
IMAGETAG: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v2
- id: install-podman
run: |
# Install podman
sudo apt update
sudo apt-get -y install --install-recommends podman
- id: build
run: |
# Build the module image
REPOBASE=${REPOBASE,,}
IMAGENAME=${REPOBASE}/nethvoice-cti
IMAGETAG=${IMAGETAG:-latest}
if [[ "${IMAGETAG}" == "main" || "${IMAGETAG}" == "master" ]]; then
IMAGETAG="latest"
fi
echo "REPOBASE=$REPOBASE" >> $GITHUB_ENV
echo "IMAGETAG=$IMAGETAG" >> $GITHUB_ENV
echo "IMAGENAME=$IMAGENAME" >> $GITHUB_ENV
podman build -t ${IMAGENAME}:${IMAGETAG} .
- id: publish
run: |
# Publish the branch
trap 'buildah logout ghcr.io' EXIT
buildah login -u ${{ github.actor }} --password-stdin ghcr.io <<<"${{ secrets.GITHUB_TOKEN }}"
buildah push ${IMAGENAME}:${IMAGETAG} docker://${IMAGENAME}:${IMAGETAG}
echo "::notice title=Image URL::${IMAGENAME}:${IMAGETAG}"