mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-25 10:22:22 +00:00
Change readme and workflow.
This commit is contained in:
98
.github/workflows/build.yml
vendored
98
.github/workflows/build.yml
vendored
@@ -62,55 +62,55 @@ jobs:
|
||||
files: subconverter_linux64.tar.gz
|
||||
draft: true
|
||||
|
||||
armv7_build:
|
||||
name: Linux armv7 Build
|
||||
runs-on: [self-hosted, linux, ARM]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Add commit id into version
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
- name: Build
|
||||
run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:armv7-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_armv7
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: tar czf subconverter_armv7.tar.gz subconverter
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_armv7.tar.gz
|
||||
draft: true
|
||||
|
||||
aarch64_build:
|
||||
name: Linux aarch64 Build
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Add commit id into version
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
- name: Build
|
||||
run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:aarch64-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: subconverter_aarch64
|
||||
path: subconverter/
|
||||
- name: Package Release
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
run: tar czf subconverter_aarch64.tar.gz subconverter
|
||||
- name: Draft Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
files: subconverter_aarch64.tar.gz
|
||||
draft: true
|
||||
# armv7_build:
|
||||
# name: Linux armv7 Build
|
||||
# runs-on: [self-hosted, linux, ARM]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - name: Add commit id into version
|
||||
# if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
# - name: Build
|
||||
# run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:armv7-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||
# - name: Upload
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: subconverter_armv7
|
||||
# path: subconverter/
|
||||
# - name: Package Release
|
||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
# run: tar czf subconverter_armv7.tar.gz subconverter
|
||||
# - name: Draft Release
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
# with:
|
||||
# files: subconverter_armv7.tar.gz
|
||||
# draft: true
|
||||
#
|
||||
# aarch64_build:
|
||||
# name: Linux aarch64 Build
|
||||
# runs-on: [self-hosted, linux, ARM64]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - name: Add commit id into version
|
||||
# if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
# run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
# - name: Build
|
||||
# run: docker run --rm -v $GITHUB_WORKSPACE:/root/workdir multiarch/alpine:aarch64-latest-stable /bin/sh -c "apk add bash git nodejs npm && cd /root/workdir && chmod +x scripts/build.alpine.release.sh && bash scripts/build.alpine.release.sh"
|
||||
# - name: Upload
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: subconverter_aarch64
|
||||
# path: subconverter/
|
||||
# - name: Package Release
|
||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
# run: tar czf subconverter_aarch64.tar.gz subconverter
|
||||
# - name: Draft Release
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||
# with:
|
||||
# files: subconverter_aarch64.tar.gz
|
||||
# draft: true
|
||||
|
||||
macos_build:
|
||||
name: macOS Build
|
||||
|
||||
278
.github/workflows/docker.yml
vendored
278
.github/workflows/docker.yml
vendored
@@ -144,145 +144,145 @@ jobs:
|
||||
name: digest_386
|
||||
path: /tmp/digest.txt
|
||||
|
||||
armv7_build:
|
||||
name: Build ARMv7 Image
|
||||
runs-on: [self-hosted, linux, ARM]
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Get commit SHA
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and export
|
||||
id: build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm/v7
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:latest-armv7
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
result-encoding: string
|
||||
|
||||
- name: Build release and export
|
||||
id: build_rel
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm/v7
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-armv7
|
||||
build-args: |
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Save digest
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Save release digest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digest_armv7
|
||||
path: /tmp/digest.txt
|
||||
|
||||
arm64_build:
|
||||
name: Build ARM64 Image
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Get commit SHA
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and export
|
||||
id: build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:latest-arm64
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
result-encoding: string
|
||||
|
||||
- name: Build release and export
|
||||
id: build_rel
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-arm64
|
||||
build-args: |
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Save digest
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Save release digest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digest_arm64
|
||||
path: /tmp/digest.txt
|
||||
# armv7_build:
|
||||
# name: Build ARMv7 Image
|
||||
# runs-on: [self-hosted, linux, ARM]
|
||||
# steps:
|
||||
# - name: Checkout base
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
#
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v2
|
||||
#
|
||||
# - name: Docker login
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
#
|
||||
# - name: Get commit SHA
|
||||
# id: vars
|
||||
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
#
|
||||
# - name: Build and export
|
||||
# id: build
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm/v7
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:latest-armv7
|
||||
# build-args: |
|
||||
# SHA=${{ steps.vars.outputs.sha_short }}
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Replace tag without `v`
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: actions/github-script@v6
|
||||
# id: version
|
||||
# with:
|
||||
# script: |
|
||||
# return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
# result-encoding: string
|
||||
#
|
||||
# - name: Build release and export
|
||||
# id: build_rel
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm/v7
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-armv7
|
||||
# build-args: |
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Save digest
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Save release digest
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: digest_armv7
|
||||
# path: /tmp/digest.txt
|
||||
#
|
||||
# arm64_build:
|
||||
# name: Build ARM64 Image
|
||||
# runs-on: [self-hosted, linux, ARM64]
|
||||
# steps:
|
||||
# - name: Checkout base
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
#
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v2
|
||||
#
|
||||
# - name: Docker login
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
#
|
||||
# - name: Get commit SHA
|
||||
# id: vars
|
||||
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
#
|
||||
# - name: Build and export
|
||||
# id: build
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm64
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:latest-arm64
|
||||
# build-args: |
|
||||
# SHA=${{ steps.vars.outputs.sha_short }}
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Replace tag without `v`
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: actions/github-script@v6
|
||||
# id: version
|
||||
# with:
|
||||
# script: |
|
||||
# return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
# result-encoding: string
|
||||
#
|
||||
# - name: Build release and export
|
||||
# id: build_rel
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm64
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-arm64
|
||||
# build-args: |
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Save digest
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Save release digest
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: digest_arm64
|
||||
# path: /tmp/digest.txt
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
# subconverter-docker
|
||||
|
||||
This is a minimized image to run https://github.com/tindy2013/subconverter.
|
||||
|
||||
For running this docker, simply use the following commands:
|
||||
```bash
|
||||
# run the container detached, forward internal port 25500 to host port 25500
|
||||
docker run -d --restart=always -p 25500:25500 tindy2013/subconverter:latest
|
||||
docker run -d --restart=always -p 25500:25500 asdlokj1qpi23/subconverter:latest
|
||||
# then check its status
|
||||
curl http://localhost:25500/version
|
||||
# if you see `subconverter vx.x.x backend` then the container is up and running
|
||||
@@ -16,7 +14,7 @@ Or run in docker-compose:
|
||||
version: '3'
|
||||
services:
|
||||
subconverter:
|
||||
image: tindy2013/subconverter:latest
|
||||
image: asdlokj1qpi23/subconverter:latest
|
||||
container_name: subconverter
|
||||
ports:
|
||||
- "15051:25500"
|
||||
|
||||
40
README.md
40
README.md
@@ -2,23 +2,46 @@
|
||||
|
||||
Utility to convert between various proxy subscription formats.
|
||||
|
||||
[](https://github.com/tindy2013/subconverter/actions)
|
||||
[](https://github.com/tindy2013/subconverter/tags)
|
||||
[](https://github.com/tindy2013/subconverter/releases)
|
||||
[](https://github.com/tindy2013/subconverter/blob/master/LICENSE)
|
||||
[](https://github.com/tindy2013/subconverter/actions)
|
||||
[](https://github.com/asdlokj1qpi23/subconverter/tags)
|
||||
[](https://github.com/asdlokj1qpi23/subconverter/releases)
|
||||
[](https://github.com/tindy2013/subconverter/blob/master/LICENSE)
|
||||
|
||||
[Docker README](https://github.com/tindy2013/subconverter/blob/master/README-docker.md)
|
||||
[Docker README](https://github.com/asdlokj1qpi23/subconverter/blob/master/README-docker.md)
|
||||
|
||||
[中文文档](https://github.com/tindy2013/subconverter/blob/master/README-cn.md)
|
||||
[中文文档](https://github.com/asdlokj1qpi23/subconverter/blob/master/README-cn.md)
|
||||
|
||||
- [subconverter](#subconverter)
|
||||
- [Docker](#docker)
|
||||
- [Supported Types](#supported-types)
|
||||
- [Quick Usage](#quick-usage)
|
||||
- [Access Interface](#access-interface)
|
||||
- [Description](#description)
|
||||
- [Advanced Usage](#advanced-usage)
|
||||
- [Auto Upload](#auto-upload)
|
||||
|
||||
## Docker
|
||||
|
||||
For running this docker, simply use the following commands:
|
||||
```bash
|
||||
# run the container detached, forward internal port 25500 to host port 25500
|
||||
docker run -d --restart=always -p 25500:25500 asdlokj1qpi23/subconverter:latest
|
||||
# then check its status
|
||||
curl http://localhost:25500/version
|
||||
# if you see `subconverter vx.x.x backend` then the container is up and running
|
||||
```
|
||||
Or run in docker-compose:
|
||||
```yaml
|
||||
---
|
||||
version: '3'
|
||||
services:
|
||||
subconverter:
|
||||
image: asdlokj1qpi23/subconverter:latest
|
||||
container_name: subconverter
|
||||
ports:
|
||||
- "15051:25500"
|
||||
restart: always
|
||||
```
|
||||
## Supported Types
|
||||
|
||||
| Type | As Source | As Target | Target Name |
|
||||
@@ -95,7 +118,7 @@ Finally subscribe this link in Clash and you are done!
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
Please refer to [中文文档](https://github.com/tindy2013/subconverter/blob/master/README-cn.md#%E8%BF%9B%E9%98%B6%E7%94%A8%E6%B3%95).
|
||||
Please refer to [中文文档](https://github.com/asdlokj1qpi23/subconverter/blob/master/README-cn.md#%E8%BF%9B%E9%98%B6%E7%94%A8%E6%B3%95).
|
||||
|
||||
## Auto Upload
|
||||
|
||||
@@ -110,3 +133,6 @@ Example:
|
||||
;uncomment the following line and enter your token to enable upload function
|
||||
token = xxxxxxxxxxxxxxxxxxxxxxxx(Your Personal Access Token)
|
||||
```
|
||||
## Thanks
|
||||
[tindy2013](https://github.com/tindy2013)
|
||||
[https://github.com/tindy2013/subconverter](https://github.com/tindy2013/subconverter)
|
||||
Reference in New Issue
Block a user