Skip to content

Commit 81095a5

Browse files
committed
dockerfile--siteproxy
1 parent d381e44 commit 81095a5

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: dockerfile--siteproxy-构建和提交docker
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "dockerfile/**"
8+
- ".github/workflows/dockerfile--siteproxy.yml"
9+
- "!**.md"
10+
11+
jobs:
12+
13+
# 并发构建
14+
setup-build-publish-v3:
15+
runs-on: ubuntu-latest
16+
name: 构建和推送docker镜像v3
17+
steps:
18+
19+
- name: 更新代码
20+
# 使用action库 actions/checkout获取源码
21+
uses: actions/checkout@v3
22+
23+
24+
-
25+
name: 登录 Docker Hub
26+
uses: docker/login-action@v2
27+
with:
28+
username: adockero
29+
password: ${{ secrets.PASSWORD }}
30+
31+
- name: tcp-proxy-base64 Build and push
32+
run: |
33+
chmod +x dockerfile/build.sh
34+
./dockerfile/build.sh "https://github.com/netptop/siteproxy" "adockero/siteproxy"
35+

dockerfile/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ echo "Dockerfile path: $DOCKERFILE_PATH"
1010
echo "Image name: $IMAGE_NAME"
1111

1212
# Clone repository
13-
git clone https://github.com/aogg/$GITHUB_NAME project
13+
if [[ "$GITHUB_NAME" == http://* ]] || [[ "$GITHUB_NAME" == https://* ]]; then
14+
git clone $GITHUB_NAME project
15+
else
16+
git clone https://github.com/aogg/$GITHUB_NAME project
17+
fi
1418
cd project
1519

1620
# Build image

0 commit comments

Comments
 (0)