1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- name: build
- on:
- push:
- tags:
- - 'v*'
- paths-ignore:
- - 'README.md'
- - datasets/**
- env:
- BUILD_VERSION: "0.1.1"
- jobs:
- test:
- name: Set up python matrix for testing
- runs-on: ubuntu-18.04
- strategy:
- matrix:
- python-version: [3.6, 3.7, 3.8, 3.9]
- steps:
- - uses: actions/checkout@master
- - name: Setup Python Matrix
- uses: actions/setup-python@v1
- with:
- python-version: ${{ matrix.python-version }}
- - 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@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: 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
|