Skip to content

Commit 48381ae

Browse files
committed
Initial commit
0 parents  commit 48381ae

3 files changed

Lines changed: 101 additions & 0 deletions

File tree

.github/workflows/sync.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Sync release
2+
on:
3+
workflow_dispatch:
4+
repository_dispatch:
5+
types: [sync-release]
6+
7+
permissions:
8+
id-token: write
9+
contents: write
10+
actions: write
11+
attestations: write
12+
13+
env:
14+
GH_TOKEN: ${{ github.token }}
15+
SOURCE_REPO: 'bindhosts/bindhosts'
16+
MODULE_NAME: 'bindhosts'
17+
18+
jobs:
19+
get_tags:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
tags: ${{ steps.check.outputs.tags }}
23+
latest: ${{ steps.check.outputs.latest }}
24+
steps:
25+
- name: Check tags
26+
id: check
27+
run: |
28+
SOURCE_TAGS=$(gh api repos/$SOURCE_REPO/tags | jq -r '.[].name' | sort)
29+
CURRENT_TAGS=$(gh api repos/$GITHUB_REPOSITORY/tags | jq -r '.[].name' | sort)
30+
MISSING=$(comm -23 <(echo "$SOURCE_TAGS") <(echo "$CURRENT_TAGS"))
31+
MISSING_JSON=$(echo "$MISSING" | jq -R -s -c 'split("\n")[:-1] | map(select(. != ""))')
32+
echo "tags=$MISSING_JSON" >> $GITHUB_OUTPUT
33+
LATEST=$(echo "$SOURCE_TAGS" | tail -1)
34+
echo "latest=$LATEST" >> $GITHUB_OUTPUT
35+
36+
release:
37+
needs: get_tags
38+
if: needs.get_tags.outputs.tags != '[]'
39+
runs-on: ubuntu-latest
40+
strategy:
41+
matrix:
42+
tag: ${{ fromJson(needs.get_tags.outputs.tags) }}
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v6
46+
with:
47+
token: ${{ secrets.REPO_SYNC_PAT }}
48+
49+
- name: Pull release artifact and notes
50+
run: |
51+
gh release download ${{ matrix.tag }} --repo $SOURCE_REPO --pattern "$MODULE_NAME.zip"
52+
BODY=$(gh release view ${{ matrix.tag }} --repo $SOURCE_REPO --json body -q .body)
53+
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
54+
echo "$BODY" >> $GITHUB_ENV
55+
echo "EOF" >> $GITHUB_ENV
56+
57+
- name: Create Release
58+
uses: KernelSU-Modules-Repo/module_release@main
59+
with:
60+
tag_name: ${{ matrix.tag }}
61+
make_latest: ${{ matrix.tag == needs.get_tags.outputs.latest }}
62+
file: "${{ env.MODULE_NAME }}.zip"
63+
body: ${{ env.RELEASE_BODY }}
64+
65+
- uses: actions/attest-build-provenance@v3
66+
with:
67+
subject-path: "${{ env.MODULE_NAME }}.zip"

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# bindhosts
2+
3+
Systemless hosts for APatch, KernelSU and Magisk
4+
5+
Fully standalone, self-updating.
6+
7+
## Features
8+
9+
- WebUI and action button control
10+
- Adaway coexistence
11+
- Systemless hosts via manager mount, bind mount, and OverlayFS
12+
- Redirect methods: ZN-hostsredirect, hosts_file_redirect, open_redirect
13+
14+
## Supported Root Managers
15+
16+
- [APatch](https://github.com/bmax121/APatch)
17+
- [KernelSU](https://github.com/tiann/KernelSU)
18+
- [Magisk](https://github.com/topjohnwu/Magisk) <sup>([no WebUI](https://github.com/topjohnwu/Magisk/issues/8609#event-15568590949)👀)</sup>
19+
20+
### Also Supported on
21+
22+
- [KsuWebUI](https://github.com/5ec1cff/KsuWebUIStandalone) <sup>🌐</sup>
23+
- [WebUI-X](https://github.com/MMRLApp/WebUI-X-Portable) <sup>🌐</sup>
24+
- [MMRL](https://github.com/MMRLApp/MMRL)
25+
26+
## More
27+
28+
- Check on [https://github.com/bindhosts/bindhosts](https://github.com/bindhosts/bindhosts)

module.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"metamodule": false,
3+
"summary": "Systemless hosts for APatch / KernelSU / Magisk ",
4+
"sourceUrl": "https://github.com/bindhosts/bindhosts",
5+
"additionalAuthors": []
6+
}

0 commit comments

Comments
 (0)