Giter VIP home page Giter VIP logo

mosquitto-github-action's Introduction

Mosquitto MQTT Broker in GitHub Actions

Start a Mosquitto message broker in your GitHub Actions.


Introduction

This GitHub Action starts a Mosquitto message broker as Docker container. The published ports, TLS certificates and the Mosquitto configuration can be adjusted as needed.

This is useful when running tests against an MQTT broker.

Usage

name: Run tests

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Git checkout
        uses: actions/checkout@v2
  
      - name: Start Mosquitto
        uses: namoshek/mosquitto-github-action@v1
        with:
          version: '1.6'
          ports: '1883:1883 8883:8883'
          certificates: ${{ github.workspace }}/.ci/tls-certificates
          config: ${{ github.workspace }}/.ci/mosquitto.conf
          password-file: ${{ github.workspace}}/.ci/mosquitto.passwd
          container-name: 'mqtt'
  
      - run: test

Currently, the following parameters are supported:

Parameter Default Description
version latest An image tag of the eclipse-mosquitto Docker image
ports 1883:1883 Port mappings in a [host]:[container] format, delimited by spaces (example: "1883:1883 8883:8883")
certificates - Absolute path to a directory containing certificate files which can be referenced in the config (the folder is mounted under /mosquitto-certs in the container)
config - Absolute path to a custom mosquitto.conf configuration file to use
password-file - Absolute path to a custom mosquitto.passwd password file which will be mounted at /mosquitto/config/mosquitto.passwd
container-name mosquitto The name of the spawned Docker container (can be used as hostname when accessed from other containers)

All parameters are optional. If no certificates are given, no volume is mounted. If no config is given, the default Mosquitto config is used.

License

This action is published under the MIT license.

mosquitto-github-action's People

Contributors

namoshek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.