Skip to content

Commit

Permalink
test: rewrite stable docker image build 13
Browse files Browse the repository at this point in the history
  • Loading branch information
Markson Hon committed Nov 12, 2023
1 parent 52dec36 commit 5fd3cb7
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 37 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/dockerimage_gui.yml

This file was deleted.

48 changes: 45 additions & 3 deletions .github/workflows/release_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ 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:
Release_v2rayA_to_Docker:
runs-on: ubuntu-22.04
needs: [GitHub_Release]
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -733,7 +733,7 @@ jobs:
IMAGE="mzz2017/v2raya"
echo image=${IMAGE} >> $GITHUB_OUTPUT
echo tag=${TAG} >> $GITHUB_OUTPUT
sed -i "s|Realv2rayAVersion$version|g" install/docker/docker_helper.sh
sed -i "s|Realv2rayAVersion|$version|g" install/docker/docker_helper.sh
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
Expand All @@ -756,4 +756,46 @@ jobs:
${{ steps.prep.outputs.image }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max

Release_v2rayA_GUI_to_Docker:
runs-on: ubuntu-22.04
needs: [GitHub_Release]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check Version
id: prep
run: |
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-gui"
echo image=${IMAGE} >> $GITHUB_OUTPUT
- name: Download Web Files
uses: actions/download-artifact@v3
with:
name: Web.zip
path: Web
- 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 and push
uses: docker/[email protected]
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
file: install/docker/Dockerfile.GUI
platforms: linux/arm,linux/arm64,linux/amd64
push: true
tags: mzz2017/v2raya-gui:latest
cache-from: type=gha
cache-to: type=gha,mode=max
4 changes: 4 additions & 0 deletions install/docker/Dockerfile.GUI.Action
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nginx:stable-alpine
WORKDIR /build
COPY ./Web /usr/share/nginx/html
EXPOSE 80

0 comments on commit 5fd3cb7

Please sign in to comment.