Skip to content

Publish Docker Image #57

Publish Docker Image

Publish Docker Image #57

name: Publish Docker Image
on:
workflow_dispatch:
inputs:
superbuild_release:
description: 'Robotology Superbuild Release'
required: true
default: 'master'
add_tag_latest:
type: boolean
description: 'Add tag latest to the docker image'
required: true
default: true
build_type:
type: choice
description: 'Build Type'
options:
- 'Release'
- 'Debug'
required: true
default: 'Release'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Require tag latest
id: add_tag_latest
if: ${{ inputs.add_tag_latest }}
run: |
echo "tag=, latest" >> $GITHUB_OUTPUT
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
env:
ROBOTOLOGY_SUPERBUILD_RELEASE: ${{ inputs.superbuild_release }}
BUILD_TYPE: ${{ inputs.build_type }}
with:
name: robotology/icub-gazebo-grasping-sandbox
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
workdir: dockerfiles
buildargs: ROBOTOLOGY_SUPERBUILD_RELEASE, BUILD_TYPE
registry: ghcr.io
tags: "${{ inputs.superbuild_release }}${{ steps.add_tag_latest.outputs.tag }}"