Skip to content

Commit

Permalink
Merge pull request #18 from Depetrol/RTI-CD
Browse files Browse the repository at this point in the history
Rti cd
  • Loading branch information
Depetrol authored Aug 1, 2024
2 parents 2948f1f + 20339e1 commit 72d2cdd
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/actions/push-rti-docker/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Push RTI to Docker Hub
description: Build and push the RTI image to Docker Hub
inputs:
tag:
description: 'The tag of the RTI image to build and push'
required: true
default: 'latest'
DOCKERHUB_USERNAME:
description: 'The username to log in to Docker Hub'
required: true
DOCKERHUB_TOKEN:
description: 'The token to log in to Docker Hub'
required: true
runs:
using: "composite"
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ inputs.DOCKERHUB_USERNAME }}
password: ${{ inputs.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Check out lingua-franca repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Build and push
uses: docker/build-push-action@v6
with:
file: ./core/src/main/resources/lib/c/reactor-c/core/federated/RTI/rti.Dockerfile
context: ./core/src/main/resources/lib/c/reactor-c
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/riscv64
push: true
tags: ${{ inputs.DOCKERHUB_USERNAME }}/rti:${{ inputs.tag }}
6 changes: 6 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ jobs:
title: "Lingua Franca Nightly"
files: |
build/distributions/*
- name: Build and push RTI to Docker Hub
uses: ./.github/actions/push-rti-docker
with:
tag: nightly
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/rti-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Push RTI Image to Docker Hub

on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
name: Build and push RTI to Docker Hub
steps:
- name: Check out lingua-franca repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Build and push RTI to Docker Hub
uses: ./.github/actions/push-rti-docker
with:
tag: master
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

0 comments on commit 72d2cdd

Please sign in to comment.