Skip to content

Disable docker build summaries #26

Disable docker build summaries

Disable docker build summaries #26

Workflow file for this run

name: Build ESPHome base container image
on:
pull_request:
branches: [main]
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Set up QEMU
uses: docker/[email protected]
with:
platforms: linux/arm64,linux/arm/v7
- name: Log in to the GitHub container registry
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get tag
id: get_tag
run: |-
if [[ "${{ github.event_name }}" = "release" ]]; then
version="${{ github.event.release.tag_name}}"
elif [[ "${{ github.event_name }}" = "pull_request" ]]; then
version="pr-${{ github.event.pull_request.number }}"
else
version=${GITHUB_REF#refs/heads/}
version=${version//\//-}
fi
echo version="$version" >> $GITHUB_OUTPUT
- name: Build image
id: build
uses: docker/[email protected]
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
target: final
cache-from: type=registry,ref=ghcr.io/esphome/docker-base:cache
cache-to: ${{ github.event_name == 'release' && 'type=registry,ref=ghcr.io/esphome/docker-base:cache,mode=max' || '' }}
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/esphome/docker-base:${{ steps.get_tag.outputs.version }}