Skip to content

build matter-openwrt-build container #23

build matter-openwrt-build container

build matter-openwrt-build container #23

name: build matter-openwrt-build container
on:
workflow_dispatch:
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
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: grep '^ARG OPENWRT_VERSION=' .containers/matter-openwrt-build/Dockerfile | cut -c 5- | tee -a "$GITHUB_OUTPUT"
- name: Build and push
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: project-chip/matter-openwrt-build
context: .containers/matter-openwrt-build
registry: ghcr.io
tags: "latest,${{ steps.prepare.outputs.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' }}