From b4536fd6b5d522bd0a6a4ee37eb5f37b63ae62c0 Mon Sep 17 00:00:00 2001 From: "Dany Khalife (MSFT)" Date: Sat, 23 Nov 2024 22:40:30 -0800 Subject: [PATCH] Add CI to build within dev container --- .github/workflows/ci.yml | 22 +++++++++++++++------- src/Pugin.h | 6 ++++++ src/mosquitto-plugin-main.cpp | 2 +- src/{Plugin.cpp => plugin.cpp} | 0 src/{Plugin.h => plugin.h} | 0 5 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 src/Pugin.h rename src/{Plugin.cpp => plugin.cpp} (100%) rename src/{Plugin.h => plugin.h} (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1af7dca..8467a62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,12 +9,20 @@ on: jobs: build: runs-on: ubuntu-latest - + permissions: + packages: write steps: - uses: actions/checkout@v4 - - name: make clean - working-directory: ./src - run: make clean - - name: make - working-directory: ./src - run: make + - name: Login to registry + run: | + docker login --username dkhalife --password ${{ secrets.GH_PAT }} ghcr.io + - name: Pre-build image and run build in dev container + uses: devcontainers/ci@v0.3 + with: + imageName: ghcr.io/dkhalife/eclipse-mosquitto-with-auth + cacheFrom: ghcr.io/dkhalife/eclipse-mosquitto-with-auth + push: always + runCmd: | + cd src + make clean + make diff --git a/src/Pugin.h b/src/Pugin.h new file mode 100644 index 0000000..1ac93d0 --- /dev/null +++ b/src/Pugin.h @@ -0,0 +1,6 @@ +#pragma once + +class Plugin +{ + +}; diff --git a/src/mosquitto-plugin-main.cpp b/src/mosquitto-plugin-main.cpp index 3b9435c..974290c 100644 --- a/src/mosquitto-plugin-main.cpp +++ b/src/mosquitto-plugin-main.cpp @@ -1,4 +1,4 @@ -#include "Plugin.h" +#include "plugin.h" #include #include diff --git a/src/Plugin.cpp b/src/plugin.cpp similarity index 100% rename from src/Plugin.cpp rename to src/plugin.cpp diff --git a/src/Plugin.h b/src/plugin.h similarity index 100% rename from src/Plugin.h rename to src/plugin.h