Publish Docker Image #65
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: 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: vvv-school/gitpod | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
workdir: dockerfiles/gitpod | |
buildargs: ROBOTOLOGY_SUPERBUILD_RELEASE, BUILD_TYPE | |
registry: ghcr.io | |
tags: "${{ inputs.superbuild_release }}${{ steps.add_tag_latest.outputs.tag }}" | |