Skip to content

Update build container to 23.05.5 #29

Update build container to 23.05.5

Update build container to 23.05.5 #29

name: build matter-openwrt-build container
on:
pull_request:
paths:
- .containers/matter-openwrt-build/**
- .github/workflows/build-matter-openwrt-build.yaml
push:
paths:
- .containers/matter-openwrt-build/**
- .github/workflows/build-matter-openwrt-build.yaml
workflow_dispatch:
inputs:
openwrt-version-override:
type: string
description: OpenWrt version number override
permissions:
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Prepare meta-data
id: prepare
shell: bash
run: |
# Determine OPENWRT_VERSION from override input or Dockerfile
if [[ -n "${{ inputs.openwrt-version-override }}" ]]; then
echo "OPENWRT_VERSION=${{ inputs.openwrt-version-override }}"
else
grep '^ARG OPENWRT_VERSION=' .containers/matter-openwrt-build/Dockerfile | cut -c 5-
fi | tee -a "$GITHUB_ENV"
- name: Build and push
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: project-chip/matter-openwrt-build
context: .containers/matter-openwrt-build
buildargs: OPENWRT_VERSION
registry: ghcr.io
tags: "${{ inputs.openwrt-version-override && '' || 'latest,'}}${{ env.OPENWRT_VERSION }}"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
no_push: ${{ github.repository_owner != 'project-chip' || github.event_name == 'pull_request' || github.event.ref != 'refs/heads/main' }}