Skip to content

Merge pull request #19 from hvalev/dependabot/github_actions/actions/… #5

Merge pull request #19 from hvalev/dependabot/github_actions/actions/…

Merge pull request #19 from hvalev/dependabot/github_actions/actions/… #5

Workflow file for this run

name: build
on:
push:
paths-ignore:
- 'README.md'
tags:
- '**'
jobs:
test:
name: Lint test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Lint with flake8
run: |
pip install flake8
flake8 . --max-line-length=130
buildx:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Version
id: get_version
uses: battila7/get-version-action@v2.3.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUBUNAME }}
password: ${{ secrets.DOCKERHUBTOKEN }}
- name: Run Buildx
run: |
docker buildx build --push \
--tag hvalev/bh1750mqtt-homeassistant:latest \
--tag hvalev/bh1750mqtt-homeassistant:${{ steps.get_version.outputs.version-without-v }} \
--platform linux/arm/v7,linux/arm64 .
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUBUNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUBPWD }}
DOCKERHUB_REPOSITORY: hvalev/bh1750mqtt-homeassistant