12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- name: build
- on:
- push:
- tags:
- - 'v*'
- paths-ignore:
- - 'README.md'
- - datasets/**
- env:
- BUILD_VERSION: "0.1.0"
- jobs:
- buildx:
- runs-on: ubuntu-latest
- steps:
- -
- name: Checkout
- uses: actions/checkout@v2
- -
- name: Set up QEMU
- uses: docker/setup-qemu-action@v1
- -
- name: Set up Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v1
- -
- name: Available platforms
- run: echo ${{ steps.buildx.outputs.platforms }}
- -
- name: Login to DockerHub
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKERHUBUNAME }}
- password: ${{ secrets.DOCKERHUBTOKEN }}
- -
- name: Get python
- uses: actions/setup-python@v2
- with:
- python-version: '3.7'
- -
- name: Lint with flake8
- run: |
- pip install flake8
- flake8 . --max-line-length=130
- -
- name: Run Buildx
- run: |
- docker buildx build --push \
- --tag hvalev/dht22mqtt-homeassistant:latest \
- --tag hvalev/dht22mqtt-homeassistant:${BUILD_VERSION} \
- --tag ghcr.io/hvalev/dht22mqtt-homeassistant-docker:latest
- --tag ghcr.io/hvalev/dht22mqtt-homeassistant-docker:${BUILD_VERSION}
- --platform linux/arm/v7,linux/arm64 .
- -
- name: Docker Hub Description
- uses: peter-evans/dockerhub-description@v2
- env:
- DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUBUNAME }}
- DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUBPWD }}
- DOCKERHUB_REPOSITORY: hvalev/dht22mqtt
|