From 3dc11d3fa225710faacb21bf3a063800e0bed59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Thu, 16 Jan 2025 09:09:42 +0100 Subject: [PATCH] ADD example3 --- .github/workflows/example3.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/example3.yml diff --git a/.github/workflows/example3.yml b/.github/workflows/example3.yml new file mode 100644 index 0000000000..94a1c4601f --- /dev/null +++ b/.github/workflows/example3.yml @@ -0,0 +1,22 @@ +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 + run: docker run -d --name mosquitto -p 1883:1883 -v $(pwd)/test/functionalTest/mosquittoConf:/mosquitto/config eclipse-mosquitto + + - 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" + docker logs mosquitto \ No newline at end of file