Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GHCR service #57

Merged
merged 1 commit into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish Docker Image

on:
workflow_dispatch:
inputs:
superbuild_release:
description: 'Robotology Superbuild Release'
required: true
default: 'master'
blocktest_release:
description: 'Blocktest Release'
required: true
default: 'devel'
blocktest_yarp_plugins_release:
description: 'Blocktest YARP Plugins Release'
required: true
default: 'master'
blocktest_ros_plugins_release:
description: 'Blocktest ROS Plugins 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 "::set-output name=tag::, latest"
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@main
env:
ROBOTOLOGY_SUPERBUILD_RELEASE: ${{ inputs.superbuild_release }}
BLOCKTEST_RELEASE: ${{ inputs.blocktest_release }}
BLOCKTEST_YARP_PLUGINS_RELEASE: ${{ inputs.blocktest_yarp_plugins_release }}
BLOCKTEST_ROS_PLUGINS_RELEASE: ${{ inputs.blocktest_ros_plugins_release }}
BUILD_TYPE: ${{ inputs.build_type }}
with:
name: robotology/blocktest
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
workdir: dockerfiles
buildargs: ROBOTOLOGY_SUPERBUILD_RELEASE, BLOCKTEST_RELEASE, BLOCKTEST_YARP_PLUGINS_RELEASE, BLOCKTEST_ROS_PLUGINS_RELEASE, BUILD_TYPE
registry: ghcr.io
tags: "${{ inputs.superbuild_release }}_${{ inputs.blocktest_release }}${{ steps.add_tag_latest.outputs.tag }}"
1 change: 1 addition & 0 deletions dockerfiles/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EXPOSE 22
ENV DEBIAN_FRONTEND=noninteractive

# Select options
ARG ROBOTOLOGY_SUPERBUILD_RELEASE=devel
ARG ROBOTOLOGY_SUPERBUILD_RELEASE=master
ARG BLOCKTEST_RELEASE=devel
ARG BLOCKTEST_YARP_PLUGINS_RELEASE=master
ARG BLOCKTEST_ROS_PLUGINS_RELEASE=master
Expand Down