forked from v2rayA/v2rayA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: rewrite stable docker image build
- Loading branch information
Markson Hon
committed
Nov 12, 2023
1 parent
d3fdacb
commit 4af410d
Showing
3 changed files
with
62 additions
and
49 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Build & Release v2rayA | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
|
@@ -676,17 +677,17 @@ jobs: | |
version=${tag:1} | ||
echo "VERSION=$version" >> $GITHUB_OUTPUT | ||
echo "VERSION=$version" >> $GITHUB_ENV | ||
- name: Download Artifacts Linux x64 | ||
- name: Download Artifact Linux x64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: v2raya_linux_x64_${{ steps.prep.outputs.VERSION }} | ||
path: Downloads | ||
- name: Download Artifacts macOS x64 | ||
- name: Download Artifact macOS x64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: v2raya_darwin_x64_${{ steps.prep.outputs.VERSION }} | ||
path: Downloads | ||
- name: Download Artifacts macOS arm64 | ||
- name: Download Artifact macOS arm64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: v2raya_darwin_arm64_${{ steps.prep.outputs.VERSION }} | ||
|
@@ -713,3 +714,54 @@ jobs: | |
v2raya-x86_64-linux.zip v2raya-x86_64-linux.zip.sha256.txt \ | ||
v2raya-x86_64-macos.zip v2raya-x86_64-macos.zip.sha256.txt \ | ||
v2raya-aarch64-macos.zip v2raya-aarch64-macos.zip.sha256.txt | ||
Release_to_Docker: | ||
runs-on: ubuntu-22.04 | ||
needs: [Build_v2rayA_Binaries] | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check Version | ||
id: prep | ||
run: | | ||
echo "P_DIR=$(pwd)" >> $GITHUB_OUTPUT | ||
tag=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
version=${tag:1} | ||
echo "VERSION=$version" >> $GITHUB_OUTPUT | ||
echo "VERSION=$version" >> $GITHUB_ENV | ||
TAG=$(echo $GITHUB_REF | cut -d / -f 3) | ||
IMAGE="mzz2017/v2raya" | ||
echo image=${IMAGE} >> $GITHUB_OUTPUT | ||
echo tag=${TAG:1} >> $GITHUB_OUTPUT | ||
- name: Download Artifact Linux x64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: v2raya_linux_x64_${{ steps.prep.outputs.VERSION }} | ||
path: Downloads | ||
- name: Download Artifact Linux arm64 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: v2raya_linux_arm64_${{ steps.prep.outputs.VERSION }} | ||
path: Downloads | ||
- name: Download Artifact Linux armv7 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: v2raya_linux_armv7_${{ steps.prep.outputs.VERSION }} | ||
path: Downloads | ||
- name: Set up QEMU | ||
uses: docker/[email protected] | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build Docker Images | ||
shell: bash | ||
run: | | ||
Current_Path=$(pwd) | ||
mkdir build_docker && cd build_docker && mkdir build | ||
cat $Current_Path/install/docker/Dockerfile.Action | sed s/Real_v2rayA_PATH/$Current_Path/Downloads/v2raya_linux_x64_${{ steps.prep.outputs.VERSION }}/g > Dockerfile.Action_x64 | ||
docker buildx build --platform linux/amd64 -f Dockerfile.Action_x64 -t $IMAGE:$TAG ./build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM alpine:latest | ||
RUN apk add --no-cache iptables ip6tables nftables | ||
COPY Real_v2rayA_PATH /usr/bin/v2raya | ||
CMD [“/usr/bin/v2raya”] | ||
EXPOSE 2017 | ||
VOLUME /etc/v2raya | ||
ENTRYPOINT ["v2raya"] |