mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-01 17:25:02 +00:00
fix vless short_id issue.(#1)
This commit is contained in:
1 parent
ebad0e96f7
commit
686f6b3517
2 files changed
+192
-192
No files matched your search
+49
-49
@@ -62,55 +62,55 @@ jobs:
|
|||||||
files: subconverter_linux64.tar.gz
|
files: subconverter_linux64.tar.gz
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
# armv7_build:
|
armv7_build:
|
||||||
# name: Linux armv7 Build
|
name: Linux armv7 Build
|
||||||
# runs-on: [self-hosted, linux, ARM]
|
runs-on: [self-hosted, linux, ARM]
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
# - name: Add commit id into version
|
- name: Add commit id into version
|
||||||
# if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
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
|
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||||
# - name: Build
|
- 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"
|
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
|
- name: Upload
|
||||||
# uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# name: subconverter_armv7
|
name: subconverter_armv7
|
||||||
# path: subconverter/
|
path: subconverter/
|
||||||
# - name: Package Release
|
- name: Package Release
|
||||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||||
# run: tar czf subconverter_armv7.tar.gz subconverter
|
run: tar czf subconverter_armv7.tar.gz subconverter
|
||||||
# - name: Draft Release
|
- name: Draft Release
|
||||||
# uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||||
# with:
|
with:
|
||||||
# files: subconverter_armv7.tar.gz
|
files: subconverter_armv7.tar.gz
|
||||||
# draft: true
|
draft: true
|
||||||
#
|
|
||||||
# aarch64_build:
|
aarch64_build:
|
||||||
# name: Linux aarch64 Build
|
name: Linux aarch64 Build
|
||||||
# runs-on: [self-hosted, linux, ARM64]
|
runs-on: [self-hosted, linux, ARM64]
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
# - name: Add commit id into version
|
- name: Add commit id into version
|
||||||
# if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
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
|
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||||
# - name: Build
|
- 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"
|
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
|
- name: Upload
|
||||||
# uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# name: subconverter_aarch64
|
name: subconverter_aarch64
|
||||||
# path: subconverter/
|
path: subconverter/
|
||||||
# - name: Package Release
|
- name: Package Release
|
||||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||||
# run: tar czf subconverter_aarch64.tar.gz subconverter
|
run: tar czf subconverter_aarch64.tar.gz subconverter
|
||||||
# - name: Draft Release
|
- name: Draft Release
|
||||||
# uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
# if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') }}
|
||||||
# with:
|
with:
|
||||||
# files: subconverter_aarch64.tar.gz
|
files: subconverter_aarch64.tar.gz
|
||||||
# draft: true
|
draft: true
|
||||||
|
|
||||||
macos_build:
|
macos_build:
|
||||||
name: macOS Build
|
name: macOS Build
|
||||||
|
|||||||
+143
-143
@@ -106,7 +106,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
platforms: linux/386
|
platforms: linux/386
|
||||||
context: scripts/
|
context: scripts/
|
||||||
tags: asdlokj1qpi23/subconverter:latest-x86
|
tags: asdlokj1qpi23/subconverter:latest
|
||||||
build-args: |
|
build-args: |
|
||||||
SHA=${{ steps.vars.outputs.sha_short }}
|
SHA=${{ steps.vars.outputs.sha_short }}
|
||||||
outputs: type=image,push=true
|
outputs: type=image,push=true
|
||||||
@@ -127,7 +127,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
platforms: linux/386
|
platforms: linux/386
|
||||||
context: scripts/
|
context: scripts/
|
||||||
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-x86
|
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}
|
||||||
outputs: type=image,push=true
|
outputs: type=image,push=true
|
||||||
|
|
||||||
- name: Save digest
|
- name: Save digest
|
||||||
@@ -144,150 +144,150 @@ jobs:
|
|||||||
name: digest_386
|
name: digest_386
|
||||||
path: /tmp/digest.txt
|
path: /tmp/digest.txt
|
||||||
|
|
||||||
# armv7_build:
|
armv7_build:
|
||||||
# name: Build ARMv7 Image
|
name: Build ARMv7 Image
|
||||||
# runs-on: [self-hosted, linux, ARM]
|
runs-on: [self-hosted, linux, ARM]
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout base
|
- name: Checkout base
|
||||||
# uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# with:
|
with:
|
||||||
# fetch-depth: 0
|
fetch-depth: 0
|
||||||
#
|
|
||||||
# - name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
# uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
#
|
|
||||||
# - name: Docker login
|
- name: Docker login
|
||||||
# uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
# with:
|
with:
|
||||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
#
|
|
||||||
# - name: Get commit SHA
|
- name: Get commit SHA
|
||||||
# id: vars
|
id: vars
|
||||||
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
#
|
|
||||||
# - name: Build and export
|
- name: Build and export
|
||||||
# id: build
|
id: build
|
||||||
# if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
# uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
# with:
|
with:
|
||||||
# platforms: linux/arm/v7
|
platforms: linux/arm/v7
|
||||||
# context: scripts/
|
context: scripts/
|
||||||
# tags: asdlokj1qpi23/subconverter:latest-armv7
|
tags: asdlokj1qpi23/subconverter:latest-armv7
|
||||||
# build-args: |
|
build-args: |
|
||||||
# SHA=${{ steps.vars.outputs.sha_short }}
|
SHA=${{ steps.vars.outputs.sha_short }}
|
||||||
# THREADS=4
|
THREADS=4
|
||||||
# outputs: type=image,push=true
|
outputs: type=image,push=true
|
||||||
#
|
|
||||||
# - name: Replace tag without `v`
|
- name: Replace tag without `v`
|
||||||
# if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
# uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
# id: version
|
id: version
|
||||||
# with:
|
with:
|
||||||
# script: |
|
script: |
|
||||||
# return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||||
# result-encoding: string
|
result-encoding: string
|
||||||
#
|
|
||||||
# - name: Build release and export
|
- name: Build release and export
|
||||||
# id: build_rel
|
id: build_rel
|
||||||
# if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
# uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
# with:
|
with:
|
||||||
# platforms: linux/arm/v7
|
platforms: linux/arm/v7
|
||||||
# context: scripts/
|
context: scripts/
|
||||||
# tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-armv7
|
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-armv7
|
||||||
# build-args: |
|
build-args: |
|
||||||
# THREADS=4
|
THREADS=4
|
||||||
# outputs: type=image,push=true
|
outputs: type=image,push=true
|
||||||
#
|
|
||||||
# - name: Save digest
|
- name: Save digest
|
||||||
# if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
# run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||||
#
|
|
||||||
# - name: Save release digest
|
- name: Save release digest
|
||||||
# if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
# run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||||
#
|
|
||||||
# - name: Upload artifact
|
- name: Upload artifact
|
||||||
# uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# name: digest_armv7
|
name: digest_armv7
|
||||||
# path: /tmp/digest.txt
|
path: /tmp/digest.txt
|
||||||
#
|
|
||||||
# arm64_build:
|
arm64_build:
|
||||||
# name: Build ARM64 Image
|
name: Build ARM64 Image
|
||||||
# runs-on: [self-hosted, linux, ARM64]
|
runs-on: [self-hosted, linux, ARM64]
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout base
|
- name: Checkout base
|
||||||
# uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# with:
|
with:
|
||||||
# fetch-depth: 0
|
fetch-depth: 0
|
||||||
#
|
|
||||||
# - name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
# uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
#
|
|
||||||
# - name: Docker login
|
- name: Docker login
|
||||||
# uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
# with:
|
with:
|
||||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
#
|
|
||||||
# - name: Get commit SHA
|
- name: Get commit SHA
|
||||||
# id: vars
|
id: vars
|
||||||
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
#
|
|
||||||
# - name: Build and export
|
- name: Build and export
|
||||||
# id: build
|
id: build
|
||||||
# if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
# uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
# with:
|
with:
|
||||||
# platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
# context: scripts/
|
context: scripts/
|
||||||
# tags: asdlokj1qpi23/subconverter:latest-arm64
|
tags: asdlokj1qpi23/subconverter:latest-arm64
|
||||||
# build-args: |
|
build-args: |
|
||||||
# SHA=${{ steps.vars.outputs.sha_short }}
|
SHA=${{ steps.vars.outputs.sha_short }}
|
||||||
# THREADS=4
|
THREADS=4
|
||||||
# outputs: type=image,push=true
|
outputs: type=image,push=true
|
||||||
#
|
|
||||||
# - name: Replace tag without `v`
|
- name: Replace tag without `v`
|
||||||
# if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
# uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
# id: version
|
id: version
|
||||||
# with:
|
with:
|
||||||
# script: |
|
script: |
|
||||||
# return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||||
# result-encoding: string
|
result-encoding: string
|
||||||
#
|
|
||||||
# - name: Build release and export
|
- name: Build release and export
|
||||||
# id: build_rel
|
id: build_rel
|
||||||
# if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
# uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
# with:
|
with:
|
||||||
# platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
# context: scripts/
|
context: scripts/
|
||||||
# tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-arm64
|
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-arm64
|
||||||
# build-args: |
|
build-args: |
|
||||||
# THREADS=4
|
THREADS=4
|
||||||
# outputs: type=image,push=true
|
outputs: type=image,push=true
|
||||||
#
|
|
||||||
# - name: Save digest
|
- name: Save digest
|
||||||
# if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
# run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||||
#
|
|
||||||
# - name: Save release digest
|
- name: Save release digest
|
||||||
# if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
# run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||||
#
|
|
||||||
# - name: Upload artifact
|
- name: Upload artifact
|
||||||
# uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# name: digest_arm64
|
name: digest_arm64
|
||||||
# path: /tmp/digest.txt
|
path: /tmp/digest.txt
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
# needs: [amd64_build, x86_build, armv7_build, arm64_build]
|
needs: [amd64_build, x86_build, armv7_build, arm64_build]
|
||||||
needs: [amd64_build, x86_build]
|
# needs: [amd64_build, x86_build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout base
|
- name: Checkout base
|
||||||
|
|||||||
Reference in new issue
Block a user