-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (35 loc) · 1.23 KB
/
build-matter-openwrt-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 != 'push' || github.event.ref != 'refs/heads/main' }}