gpt4 book ai didi

github-actions - 如何访问徽章中的 GitHub 操作输出

转载 作者:行者123 更新时间:2023-12-05 01:52:51 25 4
gpt4 key购买 nike

我有一个输出数字的 GitHub 操作工作流,我想在徽章中显示它。

使用 https://github.com/username/reponame/actions/workflows/myaction.yml/badge.svg我得到一个红色或绿色的失败/成功徽章,但我想改为显示失败次数,工作流将其输出到“错误”输出变量中。

如何在徽章中访问该变量?

最佳答案

Github actions marketplace 中的选项很少

带上您自己的徽章 - https://github.com/marketplace/actions/bring-your-own-badge

BYOB is a GitHub Action to create badges dynamically based off of GitHub Actions' results, allowing for extremely versatile and easily-maintainable badges.

如果你想使用https://shields.io/ , 考虑动态徽章 - https://github.com/marketplace/actions/dynamic-badges

This action allows you to create badges for your README.md with shields.io which may change with every commit. To do this, this action does not need to push anything to your repository!

关于github-actions - 如何访问徽章中的 GitHub 操作输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71442449/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com