diff --git a/.github/workflows/build_native.yml b/.github/workflows/build_native.yml index 257bc4176..b92e77ef2 100644 --- a/.github/workflows/build_native.yml +++ b/.github/workflows/build_native.yml @@ -50,3 +50,32 @@ jobs: path: | release/meshtasticd_linux_x86_64 bin/config-dist.yaml + + - name: Docker login + if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} + uses: docker/login-action@v3 + with: + username: meshtastic + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Docker setup + if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} + uses: docker/setup-buildx-action@v3 + + - name: Docker build and push tagged versions + if: ${{ github.event_name == 'workflow_dispatch' }} + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: meshtastic/device-simulator:${{ steps.version.outputs.version }} + + - name: Docker build and push + if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }} + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: meshtastic/device-simulator:latest