【问题标题】:How to concatenate secrets into workflow action on GitHub?如何将机密连接到 GitHub 上的工作流操作中?
【发布时间】:2023-04-10 10:25:01
【问题描述】:

我想将多个机密连接到我在 GitHub 上的工作流操作中。

想到的例子是创建从文件夹到文件名的完整路径。

【问题讨论】:

    标签: github environment-variables workflow github-actions github-secret


    【解决方案1】:

    将机密连接到 GitHub 上的工作流操作:

    ${{ format('{0}/{1}.{2}', secrets.FOLDER, secrets.FILENAME, secrets.EXT) }}

    来源: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#format

    【讨论】:

    • 效果很好,谢谢
    猜你喜欢
    • 1970-01-01
    • 2020-09-29
    • 1970-01-01
    • 2021-06-05
    • 2021-10-03
    • 2020-10-29
    • 1970-01-01
    • 2021-07-20
    • 2022-06-15
    相关资源
    最近更新 更多