From 07069a1753e1c392e37ba4899d62184cbfe35580 Mon Sep 17 00:00:00 2001 From: Tilen Komel Date: Sat, 24 Aug 2024 21:29:15 +0200 Subject: [PATCH] Add Dockerhub image push --- .github/workflows/dockerhub-push.yaml | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/dockerhub-push.yaml diff --git a/.github/workflows/dockerhub-push.yaml b/.github/workflows/dockerhub-push.yaml new file mode 100644 index 0000000..f75903b --- /dev/null +++ b/.github/workflows/dockerhub-push.yaml @@ -0,0 +1,46 @@ +name: build-push + +on: + push: + branches: + - master + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push App + uses: docker/build-push-action@v6 + with: + context: . + push: true + file: "./app/Dockerfile" + tags: ${{ secrets.DOCKERHUB_USERNAME }}/meshtastic-map:latest + + - name: Build and push API + uses: docker/build-push-action@v6 + with: + context: . + push: true + file: "./api/Dockerfile" + tags: ${{ secrets.DOCKERHUB_USERNAME }}/meshtastic-map-api:latest + + - name: Build and push MQTT listener + uses: docker/build-push-action@v6 + with: + context: . + push: true + file: "./mqtt/Dockerfile" + tags: ${{ secrets.DOCKERHUB_USERNAME }}/meshtastic-map-mqtt:latest