From 3deb32e7d6f17eaabc004bfdaae86bdee91d244a Mon Sep 17 00:00:00 2001 From: rsonghuster Date: Thu, 19 Jan 2023 12:49:09 +0800 Subject: [PATCH] fix custom go event action --- custom-function/golang/fc-custom-golang-event/publish.yaml | 2 +- custom-function/golang/fc-custom-golang-event/src/s.yaml | 2 ++ custom-function/golang/fc-custom-golang-event/src/s_en.yaml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/custom-function/golang/fc-custom-golang-event/publish.yaml b/custom-function/golang/fc-custom-golang-event/publish.yaml index 49d99c0..4e2766c 100644 --- a/custom-function/golang/fc-custom-golang-event/publish.yaml +++ b/custom-function/golang/fc-custom-golang-event/publish.yaml @@ -2,7 +2,7 @@ Type: Application Name: fc-custom-golang-event Provider: - 阿里云 -Version: 1.1.23 +Version: 1.1.24 Description: 快速部署一个基于custom runtime 的 Golang Event 类型的 Hello World 到阿里云函数计算 HomePage: https://github.com/devsapp/start-fc Tags: diff --git a/custom-function/golang/fc-custom-golang-event/src/s.yaml b/custom-function/golang/fc-custom-golang-event/src/s.yaml index d0fb235..39df50e 100644 --- a/custom-function/golang/fc-custom-golang-event/src/s.yaml +++ b/custom-function/golang/fc-custom-golang-event/src/s.yaml @@ -35,6 +35,8 @@ services: component: fc # 组件名称,Serverless Devs 工具本身类似于一种游戏机,不具备具体的业务能力,组件类似于游戏卡,用户通过向游戏机中插入不同的游戏卡实现不同的功能,即通过使用不同的组件实现不同的具体业务能力 actions: # 自定义执行逻辑,关于actions 的使用,可以参考:https://www.serverless-devs.com/serverless-devs/yaml#行为描述 pre-deploy: # 在deploy之前运行 + - run: go mod tidy + path: ./code - run: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o target/main main.go path: ./code # - component: fc build --use-docker --dockerfile ./code/Dockerfile # 要运行的组件,格式为【component: 组件名 命令 参数】(可以通过s cli registry search --type Component 获取组件列表) diff --git a/custom-function/golang/fc-custom-golang-event/src/s_en.yaml b/custom-function/golang/fc-custom-golang-event/src/s_en.yaml index 19d2f28..4622e6b 100644 --- a/custom-function/golang/fc-custom-golang-event/src/s_en.yaml +++ b/custom-function/golang/fc-custom-golang-event/src/s_en.yaml @@ -35,6 +35,8 @@ services: component: fc # The name of the component. The Serverless Devs tool itself is similar to a game console and does not have specific business capabilities. The component is similar to a game card. Users can achieve different functions by inserting different game cards into the game console, that is, by using Different components implement different specific business capabilities actions: # Customize execution logic. For the use of actions, please refer to: https://www.serverless-devs.com/serverless-devs/yaml#Behavior description pre-deploy: # run before deploy + - run: go mod tidy + path: ./code - run: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o target/main main.go path: ./code # - component: fc build --use-docker --dockerfile ./code/Dockerfile # The component to run, the format is [component: component name command parameter] (you can get the component list through s cli registry search --type Component)