Skip to content

openwrt-build

openwrt-build #5

Workflow file for this run

---
name: openwrt-build
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '15 3 * * 0'
jobs:
build:
name: Building openwrt img
runs-on: ubuntu-22.04
strategy:
matrix:
target: ["ar71xx", "mt7622"]
container:
# Ubuntu 20.04
image: sarcasticadmin/openwrt-build@sha256:3fab43fea9e698bade514af0b84192ec447708c8f24d7c5a5e383464e9c44922
# Since user is openwrt and gets 1001 from inside container
options: --user 1001
steps:
- uses: actions/checkout@v1
with:
ref: ${{ env.BRANCH }}
- name: 'Build openwrt'
shell: bash
run: |
# Make tee pipeline raises in case of fail
set -o pipefail
cd openwrt
TARGET=${{ matrix.target }} make templates build-img package 2>&1 | tee ${{ matrix.target }}-build.log
- name: 'Upload openwrt build artifact tarball'
uses: actions/[email protected]
with:
name: ${{ matrix.target }}-openwrt-build-artifacts
# Cant use relative pathing .. or . for artifacts action
# Also dont bother with '${{ github.workspace }}'
path: |
openwrt/build/artifacts/*.tar.gz
retention-days: 30
- name: 'Upload openwrt build log'
uses: actions/[email protected]
with:
name: ${{ matrix.target }}-openwrt-buildlog
path: |
openwrt/*build.log
retention-days: 30