Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
企猫商务
frp
提交
cfd1a312
F
frp
项目概览
企猫商务
/
frp
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
frp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
cfd1a312
编写于
6月 03, 2021
作者:
F
fatedier
提交者:
GitHub
6月 03, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2426 from fatedier/dev
update workflow file
上级
57577ea0
23939238
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
39 addition
and
33 deletion
+39
-33
.github/workflows/build-and-push-image.yml
.github/workflows/build-and-push-image.yml
+35
-33
.github/workflows/goreleaser.yml
.github/workflows/goreleaser.yml
+4
-0
未找到文件。
.github/workflows/build-and-push-image.yml
浏览文件 @
cfd1a312
...
...
@@ -14,27 +14,30 @@ jobs:
name
:
Build Golang project
runs-on
:
ubuntu-latest
steps
:
-
name
:
Set up Go 1.x
-
name
:
Set up Go 1.x
uses
:
actions/setup-go@v2
with
:
go-version
:
1.15
-
run
:
go version
-
name
:
Check out code into the Go module directory
go-version
:
1.16
-
run
:
|
# https://github.com/actions/setup-go/issues/107
cp -f `which go` /usr/bin/go
-
run
:
go version
-
name
:
Check out code into the Go module directory
uses
:
actions/checkout@v2
-
name
:
Build
-
name
:
Build
run
:
make build
-
name
:
Archive artifacts for frpc
-
name
:
Archive artifacts for frpc
uses
:
actions/upload-artifact@v1
with
:
name
:
frpc
path
:
bin/frpc
-
name
:
Archive artifacts for frps
-
name
:
Archive artifacts for frps
uses
:
actions/upload-artifact@v1
with
:
name
:
frps
...
...
@@ -46,42 +49,41 @@ jobs:
needs
:
binary
steps
:
# environment
-
name
:
Checkout
-
name
:
Checkout
uses
:
actions/checkout@v2
with
:
fetch-depth
:
'
0'
-
name
:
Set up QEMU
-
name
:
Set up QEMU
uses
:
docker/setup-qemu-action@v1
-
name
:
Set up Docker Buildx
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v1
# download binaries of frpc and frps
-
name
:
Download binary of frpc
-
name
:
Download binary of frpc
uses
:
actions/download-artifact@v2
with
:
name
:
frpc
path
:
bin/frpc
-
name
:
Download binary of frps
-
name
:
Download binary of frps
uses
:
actions/download-artifact@v2
with
:
name
:
frps
path
:
bin/frps
# get image tag name
-
name
:
Get Image Tag Name
-
name
:
Get Image Tag Name
run
:
|
if [ x${{ github.event.inputs.tag }} == x"" ]; then
echo "TAG_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
else
echo "TAG_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
fi
# prepare image tags
-
name
:
Prepare Image Tags
-
name
:
Prepare Image Tags
run
:
|
echo "DOCKERFILE_FRPC_PATH=dockerfiles/Dockerfile-for-frpc" >> $GITHUB_ENV
echo "DOCKERFILE_FRPS_PATH=dockerfiles/Dockerfile-for-frps" >> $GITHUB_ENV
...
...
@@ -89,9 +91,9 @@ jobs:
echo "TAG_FRPS=fatedier/frps:${{ env.TAG_NAME }}" >> $GITHUB_ENV
echo "TAG_FRPC_GPR=ghcr.io/fatedier/frpc:${{ env.TAG_NAME }}" >> $GITHUB_ENV
echo "TAG_FRPS_GPR=ghcr.io/fatedier/frps:${{ env.TAG_NAME }}" >> $GITHUB_ENV
# build images
-
name
:
Build Images
-
name
:
Build Images
run
:
|
# for Docker hub
docker build --file ${{ env.DOCKERFILE_FRPC_PATH }} --tag ${{ env.TAG_FRPC }} .
...
...
@@ -99,16 +101,16 @@ jobs:
# for GPR
docker build --file ${{ env.DOCKERFILE_FRPC_PATH }} --tag ${{ env.TAG_FRPC_GPR }} .
docker build --file ${{ env.DOCKERFILE_FRPS_PATH }} --tag ${{ env.TAG_FRPS_GPR }} .
# push to dockerhub
-
name
:
Publish to Dockerhub
-
name
:
Publish to Dockerhub
run
:
|
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
docker push ${{ env.TAG_FRPC }}
docker push ${{ env.TAG_FRPS }}
# push to gpr
-
name
:
Publish to GPR
-
name
:
Publish to GPR
run
:
|
echo ${{ secrets.GPR_TOKEN }} | docker login ghcr.io --username ${{ github.repository_owner }} --password-stdin
docker push ${{ env.TAG_FRPC_GPR }}
...
...
.github/workflows/goreleaser.yml
浏览文件 @
cfd1a312
...
...
@@ -16,6 +16,10 @@ jobs:
uses
:
actions/setup-go@v2
with
:
go-version
:
1.16
-
run
:
|
# https://github.com/actions/setup-go/issues/107
cp -f `which go` /usr/bin/go
-
name
:
Make All
run
:
|
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录