Skip to content

Simplified pip and conda environment; pypi deployment #18

Simplified pip and conda environment; pypi deployment

Simplified pip and conda environment; pypi deployment #18

# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
name: Docker-V2DL3-Eventdisplay
on:
push:
tags:
- 'v*'
pull_request:
branches: ["main"]
release:
types: [published]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-v2dl3-eventdisplay:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: 'V2DL3'
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
tags: |
type=ref,event=pr,suffix=-v2dl3-eventdisplay
type=semver,pattern={{major}}.{{minor}}.{{patch}},suffix=-v2dl3-eventdisplay
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: ./V2DL3/utils/v2dl3-eventdisplay-docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-v2dl3-eventdisplay