esphome/.github/workflows/ci-docker.yml

64 lines
1.5 KiB
YAML
Raw Normal View History

2022-09-06 05:48:01 +02:00
---
name: CI for docker images
# Only run when docker paths change
2022-09-06 05:48:01 +02:00
# yamllint disable-line rule:truthy
on:
push:
branches: [dev, beta, release]
paths:
2022-09-06 05:48:01 +02:00
- "docker/**"
- ".github/workflows/ci-docker.yml"
2022-09-06 05:48:01 +02:00
- "requirements*.txt"
- "platformio.ini"
- "script/platformio_install_deps.py"
pull_request:
paths:
2022-09-06 05:48:01 +02:00
- "docker/**"
- ".github/workflows/ci-docker.yml"
2022-09-06 05:48:01 +02:00
- "requirements*.txt"
- "platformio.ini"
- "script/platformio_install_deps.py"
permissions:
contents: read
packages: read
concurrency:
# yamllint disable-line rule:line-length
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check-docker:
name: Build docker containers
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [amd64, armv7, aarch64]
build_type: ["ha-addon", "docker", "lint"]
steps:
- uses: actions/checkout@v4.1.0
2022-09-06 05:48:01 +02:00
- name: Set up Python
uses: actions/setup-python@v4.7.1
2022-09-06 05:48:01 +02:00
with:
python-version: "3.9"
- name: Set up Docker Buildx
2023-09-13 00:06:32 +02:00
uses: docker/setup-buildx-action@v3.0.0
2022-09-06 05:48:01 +02:00
- name: Set up QEMU
2023-09-13 00:06:32 +02:00
uses: docker/setup-qemu-action@v3.0.0
2022-09-06 05:48:01 +02:00
- name: Set TAG
run: |
echo "TAG=check" >> $GITHUB_ENV
2022-09-06 05:48:01 +02:00
- name: Run build
run: |
docker/build.py \
--tag "${TAG}" \
--arch "${{ matrix.arch }}" \
--build-type "${{ matrix.build_type }}" \
build