2020-07-15 22:00:53 +02:00
|
|
|
name: CI for docker images
|
|
|
|
|
|
|
|
# Only run when docker paths change
|
|
|
|
on:
|
|
|
|
push:
|
2021-07-02 15:42:36 +02:00
|
|
|
branches: [dev, beta, release]
|
2020-07-15 22:00:53 +02:00
|
|
|
paths:
|
|
|
|
- 'docker/**'
|
|
|
|
- '.github/workflows/**'
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'docker/**'
|
|
|
|
- '.github/workflows/**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-docker:
|
|
|
|
name: Build docker containers
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [amd64, armv7, aarch64]
|
2021-07-15 21:30:04 +02:00
|
|
|
build_type: ["ha-addon", "docker", "lint"]
|
2020-07-15 22:00:53 +02:00
|
|
|
steps:
|
2021-07-15 21:30:04 +02:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.9'
|
|
|
|
- name: Set TAG
|
|
|
|
run: |
|
|
|
|
echo "TAG=check" >> $GITHUB_ENV
|
2020-07-15 22:00:53 +02:00
|
|
|
|
2021-07-15 21:30:04 +02:00
|
|
|
- name: Run build
|
|
|
|
run: |
|
|
|
|
docker/build.py \
|
|
|
|
--tag "${TAG}" \
|
|
|
|
--arch "${{ matrix.arch }}" \
|
|
|
|
--build-type "${{ matrix.build_type }}" \
|
|
|
|
build
|