开发者社区> 问答> 正文

Serverless Devs工具使用action的示例

已解决

Serverless Devs工具使用action的示例

展开
收起
提个问题 2024-05-31 18:06:30 11 0
1 条回答
写回答
取消 提交回答
  • 开发者社区问答官方账号
    官方回答
    采纳回答
    s.yaml 示例, 参考 actions 部分

    ```yaml
    edition: 1.0.0
    name: small-account
    access: 'fc-console'

    vars:
      region: cn-hangzhou
      service:
        name: test
        internetAccess: true

      test:
        component: fc
        actions:
          pre-deploy:
            - run: npm install
              path: ./code
        props: #  组件的属性值
          region: ${vars.region}
          service: ${vars.service}
          function:
            name: test
            handler: index.handler
            runtime: nodejs14
            timeout: 300
            memorySize: 128
            codeUri: './code'
    ```
    2024-05-31 18:06:31
    赞同 2 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Serverless开发平台: 让研发效能再提升 立即下载
Serverless 引领云上研发新范式 立即下载
All in Serverless 阿里云核心产品全面升级 立即下载