From 23368d2e4504602e94d85db59e33db80a7e6f66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rolf=20H=C3=A5vard=20Blindheim?= Date: Fri, 20 Sep 2024 10:04:13 +0200 Subject: [PATCH] add: debug container --- .github/workflows/elixir.yaml | 36 ++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/elixir.yaml b/.github/workflows/elixir.yaml index 16bafe7..b464d1e 100644 --- a/.github/workflows/elixir.yaml +++ b/.github/workflows/elixir.yaml @@ -16,15 +16,15 @@ jobs: build: name: Build and test runs-on: ubuntu-20.04 - services: - mosquitto: - image: eclipse-mosquitto:2.0 - ports: - - "1883:1883" - - "1884:1884" - # volumes: - # - ${{ github.workspace }}/.moquitto:/mosquitto/config - options: --name mqtt + # services: + # mosquitto: + # image: eclipse-mosquitto:2.0 + # ports: + # - "1883:1883" + # - "1884:1884" + # # volumes: + # # - ${{ github.workspace }}/.moquitto:/mosquitto/config + # options: --name mqtt strategy: fail-fast: false matrix: @@ -41,14 +41,20 @@ jobs: - name: Check out this repository uses: actions/checkout@v4 - - name: Copy Mosquitto config - run: docker cp -a ${{ github.workspace }}/.mosquitto mqtt:/mosquitto/config + - name: Start the Mosquitto MQTT broker + run: | + docker run \ + --name mqtt \ + -v ${{ github.workspace }}./mosquitto:/mosquitto/config \ + -p 1883:1883 \ + -p 1884:1884 \ + eclipse-mosquitto:2.0 # Ensure to restart MQTT after checkout to correctly bind the config volume - - name: Restart MQTT - uses: docker://docker - with: - args: docker restart mqtt + # - name: Restart MQTT + # uses: docker://docker + # with: + # args: docker restart mqtt - run: docker inspect mqtt - run: docker container exec mqtt cat /mosquitto/config/mosquitto.conf