remove python cli (#53) #57
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: Build k2eg Docker Image | |
on: | |
push: | |
branches: | |
- main | |
#- '**' | |
tags: | |
- v* | |
workflow_dispatch: | |
env: | |
GITVERSION_VERSION: 5.12.0 | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-docker-images: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- dockerfile: Dockerfile.ubuntu_kinetic | |
variant: ubuntu | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: manage version | |
run: | | |
pushd /tmp | |
wget https://github.com/GitTools/GitVersion/releases/download/$GITVERSION_VERSION/gitversion-linux-x64-$GITVERSION_VERSION.tar.gz | |
ls -la | |
tar zxvf gitversion-linux-x64-$GITVERSION_VERSION.tar.gz | |
export PATH="${PATH}:/tmp" | |
popd | |
tools/manage-version.sh src/k2eg/version.h | |
more src/k2eg/version.h | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to the Container registry | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
# list of Docker images to use as base name for tags | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.variant }} | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=semver,pattern={{version}} | |
labels: | | |
[email protected] | |
org.opencontainers.image.title=K2EG | |
org.opencontainers.image.description=Kafka To Epics Gateway | |
org.opencontainers.image.vendor=SLAC National Accelerator Laboratory | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ${{ matrix.dockerfile }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |