Skip to content

fixed docker build

fixed docker build #24

name: Publish sml2mqtt to dockerhub
on:
release:
types: [published]
# on: [push, pull_request]
jobs:
buildx:
runs-on: ubuntu-latest
environment: dockerhub
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
tags: |
spacemanspiff2007/sml2mqtt:latest
spacemanspiff2007/sml2mqtt:${{ github.ref_name }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}