小编Ric*_*ard的帖子

使用 pydub 和 AWS Lambda

下午所有 -

所以我认为标题确实说了大部分内容,但这里是。我是 AWS 和 Lambda 领域的新手,并且学习这些很有趣。我正在开发一个项目,我想自动合并 S3 中的两个文件存储。我从 AWS 的查找人员那里找到了这个 lambda 函数(https://github.com/aws-samples/chime-voiceconnector-agent-assist/blob/master/infrastruct/function/src/retrieveMergedAudioUrl/lambda_function.py),它参考:

从 pydub 导入 AudioSegment

所以我还没弄清楚的是,如何在 lambda/无服务器代码的世界中导入/构建 pydub。

谢谢,

理查德

pydub aws-lambda

5
推荐指数
1
解决办法
713
查看次数

将 GitHub Action 从 set-output 更新为 GITHUB_OUTPUT

我已经尝试了一切我能想到的变体,但未能找到正确的语法。我有一个 GitHub Actions 工作流程,当前包含以下步骤:

steps:
- name: Parse Assignee Properties
  id: assignee_properties
  uses: actions/github-script@v6
  with:
    script: |
      const assignees = context.payload.issue.assignees;
      const assigneeStrings = assignees.map(a => `{'login': '${a.login}', 'id': ${a.id}, 'url': '${a.html_url}'}`);
      const jsonArrayString = `[${assigneeStrings.join(', ')}]`;
      console.log(`::set-output name=assigneeJson::${jsonArrayString}`);
Run Code Online (Sandbox Code Playgroud)

上面使用了旧的 set-output 命令,该命令已被删除。https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/上的文档示例均使用 echo "::set-output name={ name}::{value}" 以及如何更改它们。

我在上面的脚本中尝试过这种格式,它返回一个语法错误的错误。我尝试使用 console.log 的不同变量,例如:

  • console.log(`assigneeJson='${jsonArrayString}' >> $GITHUB_OUTPUT`);
  • console.log("assigneeJson='${jsonArrayString}' >> $env:GITHUB_OUTPUT");
  • console.log("assigneeJson='${jsonArrayString}'") >> $env:GITHUB_OUTPUT;

没有一个有效。我猜这非常简单,我错过了一些明显的东西,但似乎很少有在脚本中使用它和使用 console.log 的文档。

github-actions

2
推荐指数
2
解决办法
3564
查看次数

标签 统计

aws-lambda ×1

github-actions ×1

pydub ×1