-
Notifications
You must be signed in to change notification settings - Fork 32
55 lines (55 loc) · 1.97 KB
/
openwrt-build.yml
File metadata and controls
55 lines (55 loc) · 1.97 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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: ["ath79", "mt798x"]
container:
# Ubuntu 24.04
image: sarcasticadmin/openwrt-build@sha256:25ac9d0dd4eeaad1aaaa7c82c09e9ecc103c69224fc55eb9717c4cfb018a5281
# 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/upload-artifact@v4.6.0
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
# Since we cant turn off compression set to lowest level
compression-level: 0
# rerunning jobs overwrites artifacts from previous runs
# this was the default behavior in v3.x
# ref: https://github.com/actions/upload-artifact/blob/v3.1.1/README.md?plain=1#L152
overwrite: true
# if we dont have images, scream loudly
if-no-files-found: "error"
- name: 'Upload openwrt build log'
uses: actions/upload-artifact@v4.6.0
with:
name: ${{ matrix.target }}-openwrt-buildlog
path: |
openwrt/*build.log
retention-days: 30
overwrite: true
if-no-files-found: "error"