Skip to content

build_realtime_images #3

build_realtime_images

build_realtime_images #3

name: build_realtime_images
env:
ICETRAY_VERSION_DEFAULT: v1.13.0
REALTIME_VERSION_DEFAULT: main
PUSH: true
on:
workflow_dispatch:
inputs:
icetray:
description: 'IceTray Version'
default: v1.13.0
required: true
realtime:
description: 'Realtime Version'
default: main
required: true
push:
branches: [ master ]
paths:
- 'realtime_image/Dockerfile*'
jobs:
docker:
runs-on: ubuntu-latest
timeout-minutes: 600
steps:
- name: Get current date
id: date
run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Install update repos
run: sudo apt-get update
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Set IceTray Version
run: echo "ICETRAY_VERSION=$(
if [ ${{ github.event.inputs.icetray_version }} != ${{ env.ICETRAY_VERSION_DEFAULT}} ]; then
echo ${{ github.event.inputs.icetray_version }};
else
echo ${{ env.ICETRAY_VERSION_DEFAULT }};
fi)" >> $GITHUB_ENV
- name: Set Realtime Version
run: echo "REALTIME_VERSION=$(
if [ ${{ github.event.inputs.realtime_version }} != ${{ env.REALTIME_VERSION_DEFAULT}} ]; then
echo ${{ github.event.inputs.realtime_version }};
else
echo ${{ env.REALTIME_VERSION_DEFAULT }};
fi)" >> $GITHUB_ENV
- name: Print Icetray version
run: echo "Hello ${{ env.ICETRAY_VERSION }}"
- name: Print Realtime version
run: echo "Hello ${{ env.REALTIME_VERSION }}"
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push icetray install 22 04
uses: docker/build-push-action@v4
with:
push: ${{env.PUSH}}
file: realtime_image/Dockerfile_realtime
build-args: |
TARGET_UBUNTU=ubuntu22.04
ICETRAY_VERSION=${{ env.ICETRAY_VERSION }}
REALTIME_VERSION=${{ env.REALTIME_VERSION }}
CMAKE_CXX_STANDARD=17
secrets: |
GHTOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }}
tags: >
icecube/icetray-realtime:icetray-${{ env.ICETRAY_VERSION }}-realtime-${{ env.REALTIME_VERSION }}-ubuntu22.04,
icecube/icetray-realtime:icetray-realtime-current-ubuntu22.04,
icecube/icetray-realtime:icetray-devel-${{ env.ICETRAY_VERSION }}-realtime-${{ env.REALTIME_VERSION }}-ubuntu22.04-${{ env.current_date }}