-
Notifications
You must be signed in to change notification settings - Fork 297
72 lines (66 loc) · 2.32 KB
/
Copy pathschedule-release.yml
File metadata and controls
72 lines (66 loc) · 2.32 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# This file is generated by `node scripts/openwrts.mjs generate-workflows`.
# Do not edit workflow input options by hand.
name: Scheduled OpenWrt Release
on:
workflow_dispatch:
inputs:
repo:
description: Source repo to build. Use auto for scheduled LEDE/ImmortalWrt rotation.
required: true
type: choice
options:
- auto
- lede
- immortalwrt
default: auto
upload_release:
description: Upload firmware to GitHub Releases.
required: true
type: boolean
default: true
schedule:
- cron: "23 16 * * 6"
permissions:
contents: write
jobs:
resolve:
name: ${{ (github.event.inputs.repo || 'auto') == 'lede' && 'LEDE' || (github.event.inputs.repo || 'auto') == 'immortalwrt' && 'ImmortalWrt' || 'Auto Source' }}
runs-on: ubuntu-22.04
outputs:
repo: ${{ steps.matrix.outputs.repo }}
matrix: ${{ steps.matrix.outputs.matrix }}
upload_release: ${{ steps.matrix.outputs.upload_release }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate generated workflow files
run: |
node scripts/openwrts.mjs validate-manifest
node scripts/openwrts.mjs generate-workflows --check
- name: Resolve scheduled build matrix
id: matrix
env:
REQUESTED_REPO: ${{ github.event.inputs.repo || 'auto' }}
REQUESTED_UPLOAD_RELEASE: ${{ github.event.inputs.upload_release || 'true' }}
run: |
node scripts/openwrts.mjs resolve-matrix --repo "$REQUESTED_REPO"
echo "upload_release=$REQUESTED_UPLOAD_RELEASE" >> "$GITHUB_OUTPUT"
build:
needs: resolve
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.resolve.outputs.matrix) }}
name: ${{ matrix.id }} - ${{ matrix.flavor }}
uses: ./.github/workflows/build-openwrt.yml
with:
repo: ${{ matrix.repo }}
branch: ${{ matrix.branch }}
device: ${{ matrix.id }}
op_name: ${{ matrix.op_name }}
flavor: ${{ matrix.flavor }}
target_config: ${{ matrix.target_config }}
app_config: ${{ matrix.app_config }}
driver_config: ${{ matrix.driver_config }}
cache_scope: ${{ matrix.cache_scope }}
upload_release: ${{ needs.resolve.outputs.upload_release == 'true' }}
secrets: inherit