Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
181 changes: 174 additions & 7 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

47 changes: 0 additions & 47 deletions .github/workflows/codeql.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ concurrency:

jobs:
build:
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}"]}}', github.run_id)) || 'ubuntu-latest' }}
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-build"]}}', github.run_id)) || 'ubuntu-latest' }}
permissions:
contents: read
packages: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
scan:
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}"]}}', github.run_id)) || 'ubuntu-latest' }}
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-scan"]}}', github.run_id)) || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/local-identity-leaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

trusted-ref-scan:
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')) }}
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}"]}}', github.run_id)) || 'ubuntu-latest' }}
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-trusted-ref-scan"]}}', github.run_id)) || 'ubuntu-latest' }}
permissions:
contents: read
steps:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release-aur.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:

jobs:
publish-aur:
runs-on: ubuntu-latest
runs-on: ${{ contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v'))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-publish-aur"]}}', github.run_id)) || 'ubuntu-latest' }}
steps:
- name: Resolve version
id: version
Expand Down Expand Up @@ -131,7 +131,10 @@ jobs:
tmp_key="$(mktemp)"
trap 'rm -f "$tmp_key"' EXIT
printf '%s\n' "$AUR_SSH_KEY" > "$tmp_key"
bash packaging/scripts/setup-aur-ssh.sh "$tmp_key"
git fetch --no-tags origin '+refs/heads/main:refs/remotes/origin/main'
git show origin/main:packaging/scripts/setup-aur-ssh.sh > "$RUNNER_TEMP/setup-aur-ssh.sh"
chmod 0700 "$RUNNER_TEMP/setup-aur-ssh.sh"
bash "$RUNNER_TEMP/setup-aur-ssh.sh" "$tmp_key"

- name: Push iptvtunerr-bin to AUR
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-copr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:

jobs:
publish-copr:
runs-on: ubuntu-latest
runs-on: ${{ contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v'))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-publish-copr"]}}', github.run_id)) || 'ubuntu-latest' }}
steps:
- name: Resolve version
id: version
Expand Down
53 changes: 50 additions & 3 deletions .github/workflows/release-ppa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
publish-ppa:
runs-on: ubuntu-latest
runs-on: ${{ contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v'))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-{1}-publish-ppa"]}}', github.run_id, strategy.job-index)) || 'ubuntu-latest' }}
timeout-minutes: 120
concurrency:
group: release-ppa-${{ matrix.ubuntu_series }}
Expand Down Expand Up @@ -132,18 +132,65 @@ jobs:
mv "${changes}.asc" "$changes"
gpg --batch --verify "$changes"

- name: Upload to Launchpad PPA
- name: Upload to Launchpad PPA over pinned SFTP
env:
TAG: ${{ steps.version.outputs.tag }}
LAUNCHPAD_SFTP_KEY: ${{ secrets.LAUNCHPAD_SFTP_KEY }}
LAUNCHPAD_SFTP_USER: ${{ secrets.LAUNCHPAD_SFTP_USER }}
run: |
set -euo pipefail
git fetch --quiet origin main --tags
RELEASE_REPO_DIR="$PWD" RELEASE_TAG_MAIN_MODE=latest \
bash -c "$(git show origin/main:scripts/ensure-release-tag-on-main.sh)" release-tag-guard "$TAG"
if [[ -z "${LAUNCHPAD_SFTP_KEY:-}" ]]; then
echo "::error::LAUNCHPAD_SFTP_KEY is required for private-runner PPA uploads."
exit 1
fi
user="${LAUNCHPAD_SFTP_USER:-keefshape}"
[[ "$user" =~ ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ ]] || {
echo 'Invalid Launchpad SFTP username.' >&2
exit 1
}
install -d -m 0700 ~/.ssh
printf '%s\n' "$LAUNCHPAD_SFTP_KEY" > ~/.ssh/launchpad_ppa
chmod 0600 ~/.ssh/launchpad_ppa
cat > ~/.ssh/known_hosts <<'EOF'
ppa.launchpad.net ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==
EOF
expected_fingerprint='SHA256:MGq+4hxD7RduVTcfwlwwboZnsgJC6SL/NltM8ye+gNg'
actual_fingerprint="$(ssh-keygen -lf ~/.ssh/known_hosts -E sha256 | awk '{print $2}')"
[[ "$actual_fingerprint" == "$expected_fingerprint" ]] || {
echo 'Pinned Launchpad SSH host key fingerprint mismatch.' >&2
exit 1
}
cat > ~/.ssh/config <<EOF
Host ppa.launchpad.net
HostName ppa.launchpad.net
User $user
IdentityFile ~/.ssh/launchpad_ppa
IdentitiesOnly yes
BatchMode yes
PasswordAuthentication no
KbdInteractiveAuthentication no
StrictHostKeyChecking yes
UserKnownHostsFile ~/.ssh/known_hosts
GlobalKnownHostsFile /dev/null
ProxyCommand nc -X connect -x 10.0.2.100:3128 %h %p
EOF
chmod 0600 ~/.ssh/config ~/.ssh/known_hosts
cat > ~/.dput.cf <<EOF
[iptvtunerr-ppa-sftp]
fqdn = ppa.launchpad.net
method = sftp
incoming = ~keefshape/ubuntu/iptvtunerr/
login = $user
allow_unsigned_uploads = 0
EOF
changes="$(find . -maxdepth 1 -name '*.changes' -print -quit)"
test -n "$changes"
gpg --batch --verify "$changes"
sha256sum "$changes"
dput "ppa:keefshape/iptvtunerr" "$changes"
dput --config ~/.dput.cf iptvtunerr-ppa-sftp "$changes"

- name: Wait for Launchpad binary publication
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}"]}}', github.run_id)) || 'ubuntu-latest' }}
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-release"]}}', github.run_id)) || 'ubuntu-latest' }}
permissions:
contents: write
outputs:
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
announce-discord:
name: Announce Release to Discord
needs: [release]
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}"]}}', github.run_id)) || 'ubuntu-latest' }}
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-announce-discord"]}}', github.run_id)) || 'ubuntu-latest' }}
env:
DISCORD_RELEASE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
RELEASE_URL: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:
dispatch-package-channels:
name: Publish Release Channels
needs: [release]
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}"]}}', github.run_id)) || 'ubuntu-latest' }}
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (contains(fromJSON('["push","workflow_dispatch","schedule","release","repository_dispatch"]'), github.event_name) && (github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))) && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-dispatch-package-channels"]}}', github.run_id)) || 'ubuntu-latest' }}
timeout-minutes: 240
permissions:
actions: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semgrep-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
jobs:
semgrep:
name: Semgrep CE (community rules)
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}"]}}', github.run_id)) || 'ubuntu-latest' }}
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-semgrep"]}}', github.run_id)) || 'ubuntu-latest' }}
timeout-minutes: 30
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy-filesystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: Trivy source, dependency, and configuration scan
env:
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db:2
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}"]}}', github.run_id)) || 'ubuntu-latest' }}
runs-on: ${{ (vars.NG_HOSTED_FIRST != 'true' || vars.NG_FORCE_JIT == 'true' || github.run_attempt > 1) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && fromJSON(format('{{"group":"ng-shared-main-jit","labels":["self-hosted","linux","x64","ng-shared-main-iptvtunerr","ng-main-run-{0}","gha-{0}-trivy"]}}', github.run_id)) || 'ubuntu-latest' }}
timeout-minutes: 30
steps:
- name: Checkout
Expand Down
23 changes: 11 additions & 12 deletions memory-bank/current_task.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Current task: Standardize release tags and runner PRs (2026-10-23)

- **Goal:** use one pushed `v<version>` tag convention to start new product-release builds across all nine runner-using applications; keep PR/main validation separate and limit manual recovery to already-published outputs.
- **Story IDs:** RELEASE-TAG-001 and RELEASE-TAG-002 in [work_breakdown.md](work_breakdown.md).
- **Scope:** review nine application repositories plus Packer, close manual release-build bypasses, retain existing release assets and channel recovery, and preserve runner trust and platform boundaries.
- **Status:** focused changes are pushed to the matching draft PRs: BookshelfNG #193, SeerrNG #395, QuestarrNG #140, SlskR #194, IPTV Tunerr #61, and TorrentNG #232. All nine application PRs remain drafts. Their latest exact-head checks are pending; Packer #2's CI was rejected by the organization billing/spending cap before a job started. No fix was merged or deployed.
- **Verification:** BookshelfNG 6 workflow-policy tests and release-readiness gate; SeerrNG 36 release-workflow tests plus Prettier; QuestarrNG manual-builder structure check; SlskR release-policy check; TorrentNG 7 runner-policy and 5 release-note tests; IPTV Tunerr 5 dispatcher/release-policy tests, release-channel wiring, 58 action-pin checks, YAML parsing, and embedded Bash syntax. `git diff --check` and YAML parsing pass for changed workflows.
- **Next step:** inspect exact-head checks as they complete; keep PRs draft pending required checks and infrastructure readiness. Broker deployment, runner-group reconciliation, and live release canaries remain separate outstanding work.
- **Assumptions:** IPTV Tunerr’s tester ZIPs are user-facing release assets, so the tester workflow now runs as a reusable job after the `v*` release is published; it has no standalone manual build trigger.
- **Limits:** do not merge PRs, deploy/restart runners, or create a release tag. Preserve existing published tags and native platform requirements.
- **Rollback:** revert the repository-specific workflow changes; preserve shared broker configuration and retry state.

# Current task: Bind each JIT runner to its exact workflow job (2026-10-24)

- **Goal:** prevent GitHub from assigning an unrelated queued job to a JIT guest. Packer verifies a unique label derived from the exact workflow source, including the matrix index, and rechecks uniqueness before dispatch.
- **Story ID:** JIT-QUEUE-001 in [work_breakdown.md](work_breakdown.md).
- **Scope:** update the Packer broker and all nine application workflow branches; preserve hosted fallback, owner-PR trust policy, runner groups, and resource gates.
- **Status:** Packer commit `45140cc` is pushed to PR #3. Workflow changes are staged in the nine app worktrees. Three JIT guest units remain active on the primary host; no pool pause or admission marker change was made.
- **Verification:** 187 focused Packer policy tests pass. All 165 application/Packer workflow files parse, and the label audit verifies 216 exact job contracts, including 25 matrix jobs. Live run evidence confirmed SeerrNG's Cypress job ran on the VM requested for TypeScript tests.
- **Next step:** commit and push each application workflow update, inspect PR checks and live job assignments, then deploy the broker after active guests finish and validate a live queue canary.
- **Assumptions:** a trusted-main job label is `gha-<run-id>-<workflow-job-id>`; matrix children add zero-based `strategy.job-index`. Owner-PR-specific labels remain as configured.
- **Limits:** keep active guests running; do not pause admission, clear gates, or restart the broker while a guest is active. Do not merge draft PRs before required checks and review.
- **Rollback:** revert the per-job workflow labels and Packer broker commit together; preserve queued runs and active guests.
---

## Prior runner deployment session (historical; live state not reverified)
Expand Down
Loading