mirror of
				https://github.com/esphome/esphome.git
				synced 2025-11-04 00:51:49 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			65 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			65 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
---
 | 
						|
name: CI for docker images
 | 
						|
 | 
						|
# Only run when docker paths change
 | 
						|
 | 
						|
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: ${{ matrix.os }}
 | 
						|
    strategy:
 | 
						|
      fail-fast: false
 | 
						|
      matrix:
 | 
						|
        os: ["ubuntu-24.04", "ubuntu-24.04-arm"]
 | 
						|
        build_type:
 | 
						|
          - "ha-addon"
 | 
						|
          - "docker"
 | 
						|
          # - "lint"
 | 
						|
    steps:
 | 
						|
      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
						|
      - name: Set up Python
 | 
						|
        uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
 | 
						|
        with:
 | 
						|
          python-version: "3.11"
 | 
						|
      - name: Set up Docker Buildx
 | 
						|
        uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
 | 
						|
 | 
						|
      - name: Set TAG
 | 
						|
        run: |
 | 
						|
          echo "TAG=check" >> $GITHUB_ENV
 | 
						|
 | 
						|
      - name: Run build
 | 
						|
        run: |
 | 
						|
          docker/build.py \
 | 
						|
            --tag "${TAG}" \
 | 
						|
            --arch "${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64' || 'amd64' }}" \
 | 
						|
            --build-type "${{ matrix.build_type }}" \
 | 
						|
            build
 |