mirror of
https://github.com/esphome/esphome.git
synced 2024-11-14 02:58:11 +01:00
924df1e7de
* Add macros header with more usable Arduino version defines * Change Arduino version checking to use our version defines * Add missing ESP8266 check * Rename Arduino version macro to ARDUINO_VERSION_CODE * Upgrade clang-tidy to use Arduino 3 * Fix clang-tidy warnings * Upgrade NeoPixelBus to upstream 2.6.7 * Use Arduino-version-appropriate API to set redirect flags * Remove now unnecessary CLANG_TIDY ifdefs * Add preprocessor hackery to avoid including pgmspace.h * Bump base image to 4.1.1 and update lint * Fix nfctag * Fix make_unique ambiguous * Fix ignore name * Fix ambiguous v2 * Remove unused begin * Cast time_t to prevent issues on platforms where time_t is 32bit Co-authored-by: Otto winter <otto@otto-winter.com>
100 lines
2.6 KiB
YAML
100 lines
2.6 KiB
YAML
name: Build and publish lint docker image
|
|
|
|
# Only run when docker paths change
|
|
on:
|
|
push:
|
|
branches: [dev]
|
|
paths:
|
|
- 'docker/Dockerfile.lint'
|
|
- 'requirements.txt'
|
|
- 'requirements_optional.txt'
|
|
- 'requirements_test.txt'
|
|
- 'platformio.ini'
|
|
- '.github/workflows/docker-lint-build.yml'
|
|
|
|
jobs:
|
|
deploy-docker:
|
|
name: Build and publish docker containers
|
|
if: github.repository == 'esphome/esphome'
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [amd64, armv7, aarch64]
|
|
build_type: ["lint"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
- name: Set TAG
|
|
run: |
|
|
echo "TAG=1.2" >> $GITHUB_ENV
|
|
|
|
- name: Run build
|
|
run: |
|
|
docker/build.py \
|
|
--tag "${TAG}" \
|
|
--arch "${{ matrix.arch }}" \
|
|
--build-type "${{ matrix.build_type }}" \
|
|
build
|
|
|
|
- name: Log in to docker hub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Log in to the GitHub container registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run push
|
|
run: |
|
|
docker/build.py \
|
|
--tag "${TAG}" \
|
|
--arch "${{ matrix.arch }}" \
|
|
--build-type "${{ matrix.build_type }}" \
|
|
push
|
|
|
|
deploy-docker-manifest:
|
|
if: github.repository == 'esphome/esphome'
|
|
runs-on: ubuntu-latest
|
|
needs: [deploy-docker]
|
|
strategy:
|
|
matrix:
|
|
build_type: ["lint"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
- name: Set TAG
|
|
run: |
|
|
echo "TAG=1.2" >> $GITHUB_ENV
|
|
- name: Enable experimental manifest support
|
|
run: |
|
|
mkdir -p ~/.docker
|
|
echo "{\"experimental\": \"enabled\"}" > ~/.docker/config.json
|
|
|
|
- name: Log in to docker hub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Log in to the GitHub container registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run manifest
|
|
run: |
|
|
docker/build.py \
|
|
--tag "${TAG}" \
|
|
--build-type "${{ matrix.build_type }}" \
|
|
manifest
|