-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
abfae45
commit 8f4ee15
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
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,43 @@ | ||
name: Build Go-Proxy-BingAI | ||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: | ||
- Build_Docker | ||
|
||
jobs: | ||
docker-build: | ||
name: docker-build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup timezone | ||
uses: zcong1993/setup-timezone@master | ||
with: | ||
timezone: Asia/Shanghai | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
platforms: linux/amd64 | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: | | ||
docker.io/zklcdc/go-bingai-pass:latest |
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,21 @@ | ||
FROM ubuntu:22.04 | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y wget curl && \ | ||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ | ||
apt install -y ./google-chrome-stable_current_amd64.deb && \ | ||
curl -L $(curl -s https://api.github.com/repos/Harry-zklcdc/go-bingai-pass/releases/latest | grep /go-bingai-pass-linux-amd64.tar.gz | cut -d '"' -f 4) -o go-bingai-pass-linux-amd64.tar.gz && \ | ||
tar -zxvf go-bingai-pass-linux-amd64.tar.gz && \ | ||
chmod +x go-bingai-pass && \ | ||
rm google-chrome-stable_current_amd64.deb go-bingai-pass-linux-amd64.tar.gz && \ | ||
apt clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PORT=8080 | ||
ENV BROWSER_BINARY=/opt/google/chrome/google-chrome | ||
ENV PASS_TIMEOUT=10 | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["/app/go-bingai-pass"] |