Skip to content

FIX mosquitto.conf

FIX mosquitto.conf #6

Workflow file for this run

name: Mosquitto Docker Action (example 3)
on: [push]
jobs:
publish-messages:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run Mosquitto container
# 1.6.15 fails with "Error: Invalid password hash for user user1, removing entry."
#run: docker run -d --name mosquitto -p 1883:1883 -v $(pwd)/test/functionalTest/mosquittoConf:/mosquitto/config eclipse-mosquitto:1.6.15
run: docker run -d --name mosquitto -p 1883:1883 -v $(pwd)/test/functionalTest/mosquittoConf:/mosquitto/config eclipse-mosquitto:2.0.11
- name: Publish messages
run: |
docker logs mosquitto
docker exec mosquitto mosquitto_pub -h localhost -t test/topic -m "Hello, World!"
docker exec mosquitto mosquitto_pub -h localhost -t test/topic -m "Another message"
docker exec mosquitto mosquitto_pub -h localhost -t test/topic -u user1 -P xxxx -m "Message on auth user"
echo "-------------------"
docker logs mosquitto
#docker exec mosquitto mosquitto_pub -h localhost -t test/topic -u user1 -P xxxxy -m "Message on auth user will fail"
#echo "-------------------"
#docker logs mosquitto