Skip to content

FIX permis

FIX permis #26

Workflow file for this run

name: Mosquitto Docker Action (example 1)
on: [push]
jobs:
publish-messages:
runs-on: ubuntu-latest
services:
mosquitto:
image: eclipse-mosquitto:latest
ports:
- 1883:1883
volumes:
- ${{ github.workspace}}/test/functionalTest/mosquittoConf:/mosquitto/config
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install mosquitto clients
run: sudo apt-get update && sudo apt-get install -y mosquitto-clients
- name: Publish anonymously
run: mosquitto_pub -h localhost -p 1883 -t "test/topic" -m "Hello from anonymous"
- name: Publish with user1
run: mosquitto_pub -h localhost -p 1883 -u user1 -P xxxx -t "test/topic" -m "Hello from user1"
# Create a mosquitto.conf file in the same directory with the following content:
# listener 1883
# allow_anonymous true
# password_file /mosquitto/config/passwordfile
# Create a password file with the following command:
# mosquitto_passwd -c /mosquitto/config/passwordfile user1