Skip to content

Add cyclonedds container #1

Add cyclonedds container

Add cyclonedds container #1

name: Build cyclonedds container
on:
workflow_dispatch:
push:
paths:
- cyclonedds/Dockerfile
- .github/workflows/cyclonedds-build.yml # Self-trigger
env:
REGISTRY: ghcr.io
IMAGE_NAME: bounverif/cyclonedds
VERSION: latest
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: cyclonedds
build-args: "VERSION=${{ env.VERSION }}"
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max