Check permissions (#6255) #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI for docker images | |
# Only run when docker paths change | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
branches: [dev, beta, release] | |
paths: | |
- "docker/**" | |
- ".github/workflows/ci-docker.yml" | |
- "requirements*.txt" | |
- "platformio.ini" | |
- "script/platformio_install_deps.py" | |
pull_request: | |
paths: | |
- "docker/**" | |
- ".github/workflows/ci-docker.yml" | |
- "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/[email protected] | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: "3.9" | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Set TAG | |
run: | | |
echo "TAG=check" >> $GITHUB_ENV | |
- name: Run build | |
run: | | |
docker/build.py \ | |
--tag "${TAG}" \ | |
--arch "${{ matrix.arch }}" \ | |
--build-type "${{ matrix.build_type }}" \ | |
build |