Skip to content

Commit

Permalink
Entware Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Waujito committed Aug 10, 2024
1 parent ab402c5 commit 1d33970
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 1 deletion.
92 changes: 92 additions & 0 deletions .github/workflows/build-entware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Entware Workflow

on:
- push

jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.build.outputs.version }}
strategy:
matrix:
branch: [entware]
arch:
- mipsel-3.4
steps:
- name: Entware docker container
run: |
git clone https://github.com/Entware/docker.git
docker build docker --pull --tag builder
docker volume create entware-home
- name: Get cache dir
id: cache_dir
run: |
mkdir gh_act_cache
echo "cache_dir=$(pwd)/gh_act_cache" >> ${GITHUB_OUTPUT}
- name: Restore cached build
id: cache-build-restore
uses: actions/cache/restore@v4
with:
path: ${{ steps.cache_dir.outputs.cache_dir }}
key: ${{ matrix.arch }}-cache

- name: Load entware from cache
if: steps.cache-build-restore.outputs.cache-hit == 'true'
run: |
docker run --rm --mount source=entware-home,target=/backup_vol -v ${{ steps.cache_dir.outputs.cache_dir }}:/backup ubuntu tar -xf /backup/entware.tar -C /backup_vol
docker run --rm --mount source=entware-home,target=/home/me -w /home/me ubuntu bash -c "cp -r ./backup_vol/* ./"
- name: Build entware
if: steps.cache-build-restore.outputs.cache-hit != 'true'
run: |
docker run --rm -i --mount source=entware-home,target=/home/me -w /home/me --name builder builder git clone https://github.com/Entware/Entware.git
docker run --rm -i --mount source=entware-home,target=/home/me -w /home/me/Entware --name builder builder make package/symlinks
docker run --rm -i --mount source=entware-home,target=/home/me -w /home/me/Entware --name builder builder cp -v configs/${{ matrix.arch }}.config .config
docker run --rm -i --mount source=entware-home,target=/home/me -w /home/me/Entware --name builder builder make -j$(nproc) toolchain/install
docker run --rm --mount source=entware-home,target=/backup_vol -v ${{ steps.cache_dir.outputs.cache_dir }}:/backup ubuntu tar -cf /backup/entware.tar /backup_vol/
- name: Save cache build
if: steps.cache-build-restore.outputs.cache-hit != 'true'
id: cache-build-save
uses: actions/cache/save@v4
with:
path: ${{ steps.cache_dir.outputs.cache_dir }}
key: ${{ matrix.arch }}-cache

- name: Checkout
uses: actions/checkout@v4
with:
ref: 'openwrt'

- name: Prepare workflow
shell: bash
run: |
sed -i 's/PKG_REV:=.*$/PKG_REV:=${{ github.sha }}/;s/PKG_VERSION:=.*$/PKG_VERSION:=$(date %Y%m%d)/' youtubeUnblock/Makefile
- name: Build packages
id: build
shell: bash
run: |
echo "src-link youtubeUnblock /youtubeUnblock" | docker run --rm -i --mount source=entware-home,target=/home/me -v $GITHUB_WORKSPACE:/youtubeUnblock -w /home/me/Entware --name builder builder tee -a feeds.conf
echo "CONFIG_PACKAGE_youtubeUnblock=m" | docker run --rm -i --mount source=entware-home,target=/home/me -v $GITHUB_WORKSPACE:/youtubeUnblock -w /home/me/Entware --name builder builder tee -a .config
docker run --rm -i --mount source=entware-home,target=/home/me -v $GITHUB_WORKSPACE:/youtubeUnblock -w /home/me/Entware --name builder builder ./scripts/feeds update youtubeUnblock
docker run --rm -i --mount source=entware-home,target=/home/me -v $GITHUB_WORKSPACE:/youtubeUnblock -w /home/me/Entware --name builder builder ./scripts/feeds install -a -p youtubeUnblock
docker run --rm -i --mount source=entware-home,target=/home/me -v $GITHUB_WORKSPACE:/youtubeUnblock -w /home/me/Entware --name builder builder make package/youtubeUnblock/compile V=s BUILD_LOG=1
- name: Extract packages
if: steps.build.outcome == 'success'
run: |
mkdir output
docker run --rm --user root -i --mount source=entware-home,target=/home/me -v $(pwd):/target -w /home/me/Entware --name builder builder cp -r bin /target/output/
- name: Upload packages
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.arch }}-${{ matrix.branch }}
path: $(pwd)/output
if-no-files-found: error

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# youtubeUnblock
Bypasses Googlevideo detection systems that relies on SNI. The package is for Linux only. The package is fully compatible with routers running OpenWRT. The binaries are available under [Github Actions](https://github.com/Waujito/youtubeUnblock/actions). To learn how to build and configure the package on OpenWRT, consult [this chapter](https://github.com/Waujito/youtubeUnblock?tab=readme-ov-file#openwrt-case).
Bypasses Googlevideo detection systems that relies on SNI. The package is for Linux only. The package is fully compatible with routers running OpenWRT. The binaries are available under [Github Actions OpenWRT Workflow](https://github.com/Waujito/youtubeUnblock/actions/workflows/build-openwrt.yml). To learn how to build and configure the package on OpenWRT, consult [this chapter](https://github.com/Waujito/youtubeUnblock?tab=readme-ov-file#openwrt-case).

For Windows use [GoodbyeDPI from ValdikSS](https://github.com/ValdikSS/GoodbyeDPI) (you can find how to use it for YouTube [here](https://github.com/ValdikSS/GoodbyeDPI/issues/378)) The same behavior is also implemented in [zapret package for linux](https://github.com/bol-van/zapret).

Expand Down

0 comments on commit 1d33970

Please sign in to comment.