Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
9dbc8dc
version bump
stangri Jan 24, 2025
4939f0f
luci-app-pbr: Ignore WireGuard Server if on ignored list
egc112 Feb 4, 2025
a621f29
version bump
stangri Feb 6, 2025
c3b7d54
version bump
stangri Feb 9, 2025
cf072f6
Merge branch '1.1.8' into 1.1.8
stangri Feb 9, 2025
682c70b
Merge pull request #2 from egc112/1.1.8
stangri Feb 9, 2025
bde7b23
luci-app-pbr: edit help text
egc112 Feb 10, 2025
d5f0b8a
Merge pull request #3 from egc112/1.1.8
stangri Feb 10, 2025
6cfcda4
fix docs link in README
stangri Feb 10, 2025
47acb86
wg server use cases update
stangri Feb 12, 2025
9250b6c
version bump
stangri Mar 17, 2025
fff8fdc
fix: don't resolve domain names in `is_running_iptables` check
wzrayyy Apr 7, 2025
ed7f280
Merge pull request #4 from wzrayyy/iptables-fix
stangri Apr 8, 2025
e924aa1
version bump for bugfix
stangri Apr 8, 2025
81fc5e4
version bump
stangri Apr 30, 2025
342588b
version bump
stangri May 20, 2025
edf8096
version bump
stangri May 27, 2025
40fc74a
Makefile license header update
stangri May 27, 2025
90daf4b
versiom bump
stangri Jun 3, 2025
9a2a1b5
new labels
stangri Jun 3, 2025
88270cf
better errors/warnings handling
stangri Jun 5, 2025
322c5c8
version bump
stangri Jun 5, 2025
4944ea5
version bump
stangri Jun 7, 2025
459b86d
version bump
stangri Jun 14, 2025
18d0e06
version bump
stangri Jun 18, 2025
2829606
improve readme
stangri Jul 22, 2025
210c947
update
stangri Jul 22, 2025
2c2a91f
update links to .ca
stangri Jul 22, 2025
3bcd431
forced version update before release
stangri Jul 30, 2025
bf92ada
warnings/errors refactor
stangri Jul 31, 2025
f89594f
update after apk run
stangri Jul 31, 2025
1637149
address copilot comments
stangri Aug 1, 2025
d5a5fc3
update pot
stangri Aug 1, 2025
a978fac
@systemcrash improvements
stangri Aug 1, 2025
580ecb6
version bump
stangri Aug 5, 2025
29bd449
update to 1.1.9-1
stangri Aug 6, 2025
a212240
update README link
stangri Aug 6, 2025
9d85021
add build/release workflow
stangri Aug 12, 2025
5195904
delete references to obsolete packages
stangri Aug 13, 2025
a13ccf5
version bump
stangri Aug 15, 2025
db7f51a
version bump
stangri Aug 15, 2025
c07caf3
version bump
stangri Aug 16, 2025
c353bbe
luci-app-pbr: 1.1.9-9
stangri Aug 17, 2025
fa97e3c
verision bump
stangri Aug 18, 2025
7db14a4
version update
stangri Aug 24, 2025
78e7b7f
version bump
stangri Aug 31, 2025
00eefc5
version bump
stangri Sep 2, 2025
d73c9db
version bump
stangri Sep 4, 2025
877381b
version bump
stangri Sep 14, 2025
f57387c
version bump
stangri Sep 14, 2025
63cabb8
add support for dest_dns_port and parsing of ubus gateways array
stangri Sep 15, 2025
f3079ee
version bump
stangri Sep 15, 2025
c4b3f3c
include mktemp error message
stangri Sep 16, 2025
9e0bdbe
version bump
stangri Sep 18, 2025
b6ffbe3
version bump
stangri Sep 18, 2025
1bd73ec
version bump
stangri Sep 20, 2025
d17d094
version bump
stangri Sep 21, 2025
b8cb289
version bump
stangri Sep 22, 2025
1c2fc46
version bump
stangri Sep 23, 2025
4ce6cac
version bump
stangri Sep 23, 2025
8e92e68
IPKG_INSTROOT and ubus fixes
stangri Sep 24, 2025
f6284d7
create 1.2.0
stangri Sep 27, 2025
4a7c87c
version bump
stangri Sep 28, 2025
38e741f
netifd-related changes
stangri Sep 30, 2025
f341823
version bump
stangri Oct 1, 2025
f8a83b0
sync with principal
stangri Oct 1, 2025
616b603
version bump
stangri Oct 2, 2025
62ae431
version bump
stangri Oct 3, 2025
2463304
version bump
stangri Oct 3, 2025
0cfbc6f
version bump
stangri Oct 8, 2025
3055b26
version bump
stangri Oct 10, 2025
aabc4bb
update to r21
stangri Oct 22, 2025
84861f4
Update Makefile 1.2.1, Version bump, sync with pbr (#8)
egc112 Nov 6, 2025
e81bdce
Add uplink_ip_rules_priority configuration option
brauliobo Nov 9, 2025
175091f
Merge pull request #10 from brauliobo/feature/implement-uplink-ip-rul…
stangri Nov 21, 2025
4c7ac71
fix platform support in reply, trim rpcd script
stangri Nov 21, 2025
cbebafc
version bump
stangri Nov 24, 2025
34bf359
fix non-function calls
stangri Nov 28, 2025
4f00949
Version Bump to get in line with PBR
egc112 Dec 8, 2025
71ff140
version bump
stangri Dec 8, 2025
43db884
version bump
stangri Dec 9, 2025
b5c3306
version bump
stangri Dec 9, 2025
8160b91
feat: update translation template line numbers and modify RPC script
stangri Dec 21, 2025
b3e9aff
version bump
stangri Dec 29, 2025
f200018
version bump
stangri Jan 3, 2026
a30812f
bump copyright year in Makefile
stangri Jan 6, 2026
539213c
update donate link
stangri Jan 8, 2026
63061d2
replace RPCD call with direct ubus pull
stangri Jan 14, 2026
cb166ac
add line break before donate text
stangri Jan 15, 2026
7245309
fix command injection (thanks @iwallplace)
stangri Jan 16, 2026
4df3ac5
switch CI to build using 25.12
stangri Jan 17, 2026
17c28e4
version bump
stangri Jan 22, 2026
8ca0b10
update to sync with principal package
stangri Jan 23, 2026
513c51b
minor rpcd fixes
stangri Jan 24, 2026
e62d043
version bump
stangri Jan 26, 2026
2f39bea
version bump
stangri Jan 26, 2026
1755418
version bump
stangri Jan 26, 2026
ecf1d35
sync with principal
stangri Jan 27, 2026
5cc05bc
Version bump to 69 (#13)
egc112 Jan 27, 2026
2898bea
sync with principal package
stangri Jan 29, 2026
6892c88
version bump
stangri Jan 29, 2026
ab82214
version bump
stangri Jan 29, 2026
d534061
version bump
stangri Jan 30, 2026
2a51a40
version bump
stangri Jan 30, 2026
ccd94e2
version bump
stangri Feb 1, 2026
303530e
fix #14, thanks @systemcrash
stangri Feb 3, 2026
2692911
update pot
stangri Feb 4, 2026
b57e893
Version bump (#15)
egc112 Feb 4, 2026
17c2044
don't list wan6 in case of split wan
stangri Feb 5, 2026
bf4b298
version bump
stangri Feb 6, 2026
fa6a4e4
version bump
stangri Feb 8, 2026
1796982
version bump (#16)
egc112 Feb 10, 2026
4beb944
sync with principal package
stangri Feb 10, 2026
d6c657b
update source repo URL
stangri Feb 13, 2026
d4a60af
version bump
stangri Feb 13, 2026
306e521
initial commit to branch
stangri Feb 16, 2026
8195bc1
initial commit
stangri Feb 16, 2026
24e86c1
add curly braces to variables inside of curly braces
stangri Feb 17, 2026
69fd09d
ucode conversion
stangri Feb 18, 2026
ddb8be9
version bump
stangri Feb 18, 2026
a2c6f94
sync with principal
stangri Feb 20, 2026
4926f4c
version bump
stangri Feb 21, 2026
87eeacc
sync with principal
stangri Feb 21, 2026
d7f39ea
version bump
stangri Feb 21, 2026
d5e3aa7
more elegant ucode/rpcd
stangri Feb 21, 2026
48f4b57
version bump
stangri Feb 21, 2026
e2ff774
switch to pbr object; switch README anchors to kebab case
stangri Feb 22, 2026
e2e9fd3
version bump
stangri Feb 22, 2026
0fa7a24
version bump
stangri Feb 23, 2026
16b1605
update to use new ucode from principal package
stangri Feb 23, 2026
b2d5f6d
more native Gateways status output
stangri Feb 23, 2026
d41895b
add try-catch check in the overview include file
stangri Feb 24, 2026
bf0456e
update pot
stangri Feb 25, 2026
4581089
use native ucode calls instead of system calls and js linter fixes
stangri Feb 25, 2026
ec47f7b
update pot
stangri Feb 25, 2026
03a1bfd
ES linter fixes
stangri Feb 26, 2026
c08ca0f
add eslinter to workflow
stangri Feb 27, 2026
1e1fdd4
version bump
stangri Mar 1, 2026
ebc89bd
safer wait for long pbr operations
stangri Mar 3, 2026
2119443
version bump
stangri Mar 3, 2026
35ad632
bugfix: solve js console warnings/errors
stangri Mar 4, 2026
c4ac454
fix status layout/formatting
stangri Mar 4, 2026
1e2cb93
version bump
stangri Mar 6, 2026
fddb7da
version bump
stangri Mar 8, 2026
c09bbca
version bump
stangri Mar 11, 2026
f9e33cb
version bump
stangri Mar 11, 2026
f798f3b
version bump
stangri Mar 13, 2026
6054fd3
rework protocols support
stangri Mar 15, 2026
07d6140
drop webui_show_ignore_target
stangri Mar 16, 2026
4f02c46
version bump
stangri Mar 16, 2026
9581d63
version bump
stangri Mar 17, 2026
849e3cd
version bump
stangri Apr 13, 2026
7cc7501
version bump
stangri Apr 13, 2026
0dcb714
version bump
stangri Apr 13, 2026
e16833b
fix: lowercase supported/ignore interfaces
stangri Apr 21, 2026
fc32361
Revert "fix: lowercase supported/ignore interfaces"
stangri Apr 21, 2026
73de0d8
fix: remove lowercase wording from interface options
stangri Apr 21, 2026
473a957
updated pot
stangri Apr 21, 2026
a556433
add errorInterfaceRoutingUnknownGateway, bump compat to 32
stangri May 6, 2026
3e49b5b
version bump
stangri May 6, 2026
31b6ff2
mwan4 integration
stangri May 10, 2026
a8cd203
version bump
stangri May 13, 2026
8b6333e
version bump
stangri May 16, 2026
936b2c5
version bump
stangri May 26, 2026
c23f8ff
version bump
stangri May 26, 2026
4ee1cd7
change URLs to mossdef.org
stangri Jun 11, 2026
893413b
version bump
stangri Jun 26, 2026
faf05b0
version bump
stangri Jun 29, 2026
4a59b46
update workflow
stangri Jun 29, 2026
4a4fd4e
Pin SDK to stable point releases (25.12.5 / 24.10.7)
stangri Jul 2, 2026
7eebc8b
Prune stale release assets after publishing
stangri Jul 2, 2026
4c885e9
Keep apk 'r' release prefix in built asset filenames
stangri Jul 4, 2026
408080b
Notify repo.mossdef.org on release (event-driven sync)
stangri Jul 4, 2026
de61d2d
HTML-escape untrusted scalar values
stangri Jul 10, 2026
789593c
limit ACL scope
stangri Jul 10, 2026
655cf61
update pot
stangri Jul 11, 2026
cf51875
harden ACL
stangri Jul 14, 2026
13a895f
version bump
stangri Jul 16, 2026
aac1cfd
Add Erik Conijn to package maintainers
stangri Jul 16, 2026
9150c21
CI: bump GitHub Actions to Node 24 runtimes
stangri Jul 18, 2026
d58160a
update LUCI_URL
stangri Jul 19, 2026
06e34c5
luci-app-pbr-1.2.3: status: always display gateway placeholders
egc112 Jul 22, 2026
cced5da
Merge pull request #27 from egc112/luci-1.2.3-display-gateway
stangri Jul 22, 2026
d99782a
luci-app-pbr-1.2.3: bump compat to 34, add gateway warning strings (#28)
egc112 Jul 24, 2026
4f9d792
luci-app-pbr: add uplink_interface/uplink_interface6 advanced options…
egc112 Jul 27, 2026
15deec4
Bump package release version from 73 to 75
egc112 Jul 27, 2026
32ea5fa
Increment package release version from 75 to 77
egc112 Jul 29, 2026
7140c4d
Update PKG_RELEASE to 79
egc112 Aug 3, 2026
d46d21a
luci-app-pbr-1.2.3: force-write uplink_interface/uplink_interface6 de…
egc112 Aug 3, 2026
057d1f3
luci-app-pbr-1.2.3: adapt to luci-base default-vs-write UCI change
egc112 Aug 10, 2026
943647d
luci-app-pbr-1.2.3: keep resolver_set when nft set support is undetected
egc112 Aug 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions .github/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import { defineConfig, globalIgnores } from 'eslint/config';
import globals from 'globals';
import markdown from "@eslint/markdown";
import json from '@eslint/json';
import js from '@eslint/js';

export default defineConfig([
globalIgnores([
'node_modules',
]),
// Markdown
{
files: ["**/*.md"],
plugins: {
markdown,
},
processor: "markdown/markdown",
},
// applies only to JavaScript blocks inside of Markdown files
{
files: ["**/*.md/*.js"],
rules: {
strict: "off",
},
},
// JSON files
{
files: ['**/*.json'],
ignores: ['package-lock.json'],
plugins: { json },
language: 'json/json',
extends: ['json/recommended'],
rules: {
'json/no-duplicate-keys': 'error',
},
},
// JavaScript files
{
files: ['**/*.js'],
language: '@/js',
plugins: { js },
extends: ['js/recommended'],
linterOptions: {
reportUnusedDisableDirectives: "off",
},
languageOptions: {
sourceType: 'script',
ecmaVersion: 2026,
globals: {
...globals.browser,
/* LuCI runtime / cbi exports */
_: 'readonly',
N_: 'readonly',
L: 'readonly',
E: 'readonly',
TR: 'readonly',
cbi_d: 'readonly',
cbi_strings: 'readonly',
cbi_d_add: 'readonly',
cbi_d_check: 'readonly',
cbi_d_checkvalue: 'readonly',
cbi_d_update: 'readonly',
cbi_init: 'readonly',
cbi_update_table: 'readonly',
cbi_validate_form: 'readonly',
cbi_validate_field: 'readonly',
cbi_validate_named_section_add: 'readonly',
cbi_validate_reset: 'readonly',
cbi_row_swap: 'readonly',
cbi_tag_last: 'readonly',
cbi_submit: 'readonly',
cbi_dropdown_init: 'readonly',
isElem: 'readonly',
toElem: 'readonly',
matchesElem: 'readonly',
findParent: 'readonly',
sfh: 'readonly',
renderBadge: 'readonly',
/* modules */
baseclass: 'readonly',
dom: 'readonly',
firewall: 'readonly',
fwtool: 'readonly',
form: 'readonly',
fs: 'readonly',
network: 'readonly',
nettools: 'readonly',
poll: 'readonly',
random: 'readonly',
request: 'readonly',
session: 'readonly',
rpc: 'readonly',
uci: 'readonly',
ui: 'readonly',
uqr: 'readonly',
validation: 'readonly',
view: 'readonly',
widgets: 'readonly',
/* dockerman */
dm2: 'readonly',
jsapi: 'readonly',
},
parserOptions: {
ecmaFeatures: {
globalReturn: true,
},
},
},
rules: {
'strict': 0,
'no-prototype-builtins': 0,
'no-empty': 0,
'no-undef': 'warn',
'no-unused-vars': ['off', { "caughtErrors": "none" }],
'no-regex-spaces': 0,
'no-control-regex': 0,
},
},
]);
47 changes: 47 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "ESLint"

on:
push:
branches: ["main"]
paths:
- '**/*.js'
- '**/*.json'
- '**/*.md'
- '.github/eslint.config.mjs'

pull_request:
branches: ["main"]
paths:
- '**/*.js'
- '**/*.json'
- '**/*.md'
- '.github/eslint.config.mjs'

permissions: {}

jobs:
eslint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out repository
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: latest

- name: Install ESLint
run: |
npm install --no-audit --no-fund --save-dev \
eslint@9 \
globals \
@eslint/json@latest \
@eslint/js@9 \
@eslint/markdown \
eslint-formatter-gha

- name: Run ESLint
run: npx eslint --config .github/eslint.config.mjs .
212 changes: 212 additions & 0 deletions .github/workflows/openwrt-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
permissions:
contents: write
name: Build OpenWrt Package

on:
push:
workflow_dispatch:

jobs:
build:
name: Build for ${{ matrix.version }} / ${{ matrix.target }}
runs-on: ubuntu-latest
env:
REPO_APK_KEY: ${{ secrets.REPO_APK_KEY }}
PKG_NAME: ${{ github.event.repository.name }}

strategy:
fail-fast: false
matrix:
include:
- version: openwrt-24.10
target: x86_64
suffix: all
# - version: openwrt-24.10
# target: aarch64_cortex-a53
# - version: openwrt-24.10
# target: aarch64_generic
# - version: openwrt-24.10
# target: arm_cortex-a7
# - version: openwrt-24.10
# target: arm_cortex-a9
# - version: openwrt-24.10
# target: mips_24kc
# - version: openwrt-24.10
# target: mipsel_24kc
- version: openwrt-25.12
target: x86_64
suffix: noarch
# - version: openwrt-25.12
# target: aarch64_cortex-a53
# - version: openwrt-25.12
# target: aarch64_generic
# - version: openwrt-25.12
# target: arm_cortex-a7
# - version: openwrt-25.12
# target: arm_cortex-a9
# - version: openwrt-25.12
# target: mips_24kc
# - version: openwrt-25.12
# target: mipsel_24kc

steps:
- name: 🧾 Checkout repo
uses: actions/checkout@v5

- name: 🧰 Set up melmac feed structure
run: |
set -e
# Also add a shim so ../../luci.mk from package/feeds/melmac/<pkg> works:
mkdir -p package
printf 'include $(TOPDIR)/feeds/luci/luci.mk\n' > package/luci.mk

# LuCI-style layout so ../../luci.mk resolves from applications/<pkg>
mkdir -p feed/luci/applications/${PKG_NAME}

# Add shim luci/luci.mk pointing to the official LuCI feed
mkdir -p feed/luci
printf 'include $(TOPDIR)/feeds/luci/luci.mk\n' > feed/luci/luci.mk

# Copy the package sources into the feed subdir (exclude CI and feed itself)
rsync -av \
--exclude='.git' \
--exclude='feed' \
--exclude='.github' \
./ feed/luci/applications/${PKG_NAME}/

- name: 🧮 Compute ARCH
run: |
# matrix.version is the release-line LABEL baked into artifact filenames
# (sync_repo.sh matches *_openwrt-25.12_*), NOT the SDK image tag. Pin the
# SDK to a specific STABLE point release so builds are reproducible and
# immune to <ver>-SNAPSHOT mirror churn (rotated/truncated tarballs ->
# sha256 mismatch). Bump these when a new point release ships.
case "${{ matrix.version }}" in
openwrt-25.12) SDK_VERSION="25.12.5" ;;
openwrt-24.10) SDK_VERSION="24.10.7" ;;
snapshots) SDK_VERSION="SNAPSHOT" ;;
*) SDK_VERSION="${{ matrix.version }}" ;;
esac
echo "ARCH=${{ matrix.target }}-${SDK_VERSION}" >> "$GITHUB_ENV"

- name: 🏗️ Build with OpenWrt SDK
uses: openwrt/gh-action-sdk@v8
env:
ARCH: ${{ env.ARCH }}
FEEDNAME: melmac
PACKAGES: ${{ env.PKG_NAME }}
INDEX: 0
FEED_DIR: ${{ github.workspace }}/feed
NO_SHFMT_CHECK: 1
NO_REFRESH_CHECK: 1
PRIVATE_KEY: ${{ secrets.REPO_APK_KEY }}

- name: 🔍 Debug build output
run: |
echo "=== Build directory structure ==="
find . -name "*.ipk" -type f 2>/dev/null || echo "No .ipk files found"
echo "=== bin directory structure ==="
ls -la bin/ 2>/dev/null || echo "No bin directory found"
if [ -d "bin/packages" ]; then
echo "=== packages directory structure ==="
find bin/packages/ -type f -name "*.ipk" 2>/dev/null || echo "No .ipk files in packages directory"
echo "=== Full packages directory tree ==="
ls -laR bin/packages/ 2>/dev/null || echo "No packages directory"
fi

- name: 🏷️ Rename APK with version and target
run: |
set -euo pipefail
PKG_VERSION=$(grep -E '^PKG_VERSION *:?=' Makefile | head -n1 | cut -d= -f2 | tr -d '[:space:]')
PKG_RELEASE=$(grep -E '^PKG_RELEASE *:?=' Makefile | head -n1 | cut -d= -f2 | tr -d '[:space:]')
for ext in ipk apk; do
# apk keeps OpenWrt's 'r' release prefix (…-r5.apk); opkg does not
case "$ext" in apk) REL="r${PKG_RELEASE}" ;; *) REL="${PKG_RELEASE}" ;; esac
for f in $(find bin/packages -type f -path "*/melmac/*.${ext}"); do
dir=$(dirname "$f")
if [ -n "${{ matrix.suffix }}" ]; then
mv -v "$f" "$dir/${PKG_NAME}-${PKG_VERSION}-${REL}_${{ matrix.version }}_${{ matrix.suffix }}.${ext}"
else
mv -v "$f" "$dir/${PKG_NAME}-${PKG_VERSION}-${REL}_${{ matrix.version }}_${{ matrix.target }}.${ext}"
fi
done
done

- name: 📦 Upload artifact for ${{ matrix.target }}
uses: actions/upload-artifact@v7
with:
name: ${{ env.PKG_NAME }}-${{ matrix.target }}-${{ matrix.version }}
path: |
bin/packages/*/melmac/${{ env.PKG_NAME }}*.ipk
bin/packages/*/melmac/${{ env.PKG_NAME }}*.apk
# bin/packages/*/melmac/Packages*
# bin/packages/*/melmac/index.json
# bin/packages/*/melmac/packages.adb
if-no-files-found: ignore

release:
name: Release ${{ github.repository }}
needs: build
runs-on: ubuntu-latest

steps:
- name: 🧾 Checkout repo
uses: actions/checkout@v5

- name: 🔍 Extract version and release from Makefile
id: version
run: |
PKG_VERSION=$(grep -E '^PKG_VERSION *:?=' Makefile | head -n1 | cut -d= -f2 | tr -d '[:space:]')
PKG_RELEASE=$(grep -E '^PKG_RELEASE *:?=' Makefile | head -n1 | cut -d= -f2 | tr -d '[:space:]')
COMBINED_VERSION="${PKG_VERSION}-${PKG_RELEASE}"
echo "📦 Version: $COMBINED_VERSION"
echo "version=$COMBINED_VERSION" >> "$GITHUB_OUTPUT"

- name: ⬇️ Download all build artifacts
uses: actions/download-artifact@v8
with:
path: ./release-assets

- name: 🗃️ Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: Build v${{ steps.version.outputs.version }}
files: |
./release-assets/**/*.ipk
./release-assets/**/*.apk
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 🧹 Prune stale release assets
# Delete assets on the tag that THIS build did not produce, so an arch or
# release line you stopped building no longer lingers on the release (and
# no longer gets re-published by sync_repo.sh, which pulls from releases).
# Gated on a fully green build + a non-empty keep set so a transient arch
# failure or an empty build can never wipe a still-good binary.
if: needs.build.result == 'success'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: v${{ steps.version.outputs.version }}
run: |
keep=$(find release-assets -type f \( -name '*.ipk' -o -name '*.apk' \) \
-exec basename {} \; | sort -u)
[ -n "$keep" ] || { echo "no packages built — skipping prune"; exit 0; }
gh release view "$TAG" --json assets --jq '.assets[].name' | while read -r a; do
case "$a" in *.ipk|*.apk) ;; *) continue ;; esac
printf '%s\n' "$keep" | grep -qxF -- "$a" || {
echo "pruning stale asset: $a"
gh release delete-asset "$TAG" "$a" --yes
}
done
- name: 🔔 Notify repo.mossdef.org
# Event-driven sync: ping the repo so it publishes this release immediately
# instead of waiting for its hourly poll. Non-fatal if the token is absent.
if: needs.build.result == 'success'
env:
GH_TOKEN: ${{ secrets.SYNC_DISPATCH_TOKEN }}
run: |
gh api -X POST /repos/mossdef-org/repo.mossdef.org/dispatches \
-f event_type=package-released \
|| echo "dispatch failed — repo.mossdef.org still syncs on its hourly schedule"
Loading