Skip to content

Commit

Permalink
tags
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Nov 29, 2023
1 parent d462ad9 commit 098f28f
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ on:
inputs:
publish:
type: boolean
description: Publish the image to the registry
description: Publish the image to the GitHub Container Registry
required: true
default: true
tag:
type: string
description: Tag the image
required: true
default: latest

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
IMAGE_NAME: ghcr.io/lobis/geant4:${{ github.event.inputs.tag }}

jobs:
docker-image:
timeout-minutes: 30
Expand All @@ -37,16 +45,16 @@ jobs:
context: .
push: false
tags: |
ghcr.io/lobis/geant4:latest
${{ env.IMAGE_NAME }}
labels: |
maintainer.name="Luis Antonio Obis Aparicio"
maintainer.email="luis.antonio.obis@gmail.com"
org.opencontainers.image.source="https://github.com/lobis/geant4-pythonic-application"
maintainer.name=Luis Antonio Obis Aparicio
maintainer.email=luis.antonio.obis@gmail.com
org.opencontainers.image.source=${{ github.repository }}
- name: Test image
run: |
docker run --rm ghcr.io/lobis/geant4:latest -c 'from geant4 import Application; Application().setup_manager()'
docker run --rm ${{ env.IMAGE_NAME }} -c 'from geant4 import Application; Application().setup_manager()'
- name: Publish
run: docker push ghcr.io/lobis/geant4:latest
run: docker push ${{ env.IMAGE_NAME }}
if: ${{ github.event.inputs.publish }}

0 comments on commit 098f28f

Please sign in to comment.