ScoopInstaller/GithubActions · 文件 下载 ZIP
文件最后提交记录最后更新时间
README.md
以下内容由 AI 翻译,如有问题请点此提交 issue 反馈
Scoop 桶的 Github Actions
一组自动化操作,供 issue / pull request 的维护者使用,以节省管理 issue / pull request 的时间。
可用的环境变量
GITHUB_TOKEN- REQUIRED
- Use
${{ secrets.GITHUB_TOKEN }}
USER_EMAIL- String
- Optional
SCOOP_REPO- String
- If specified, scoop config 'scoop_repo' will be configured and scoop updated
SCOOP_BRANCH- String
- If specified, scoop config 'scoop_branch' will be configured and scoop updated
SKIP_UPDATED- String. Use
'1'or'0' - If enabled, log of checkver utility will not print latest versions
- String. Use
THROW_ERROR- String. Use
'1'or'0' - If enabled, error from checkver utility will be thrown as exception and cause the run to fail
- String. Use
SPECIAL_SNOWFLAKES- String
- List of manifest names joined with
,used as parameter for auto-pr utility.
可用操作
挖掘机
- 不支持受保护的默认分支。
- 定期为所有清单执行自动更新
- 有关配置格式,请参阅 workflow triggers
问题
当新 issue 被创建 或 issue 上 添加了标签 verify 时,该 action 会被执行。
根据 issue 标题,会执行一个特定的子 action。
它可能是以下之一:
- Hash check fails
- Checkhashes binary is executed for manifest in title
- Result is parsed
- Hash mismatch
- Pull requests with name
<manifest>@<version>: Fix hashare listed- There is PR already
- The newest one is selected
- Description of this PR is updated with closing directive for created issue
- Comment to issue is posted with reference to PR
- Label
duplicateadded
- If none
- New branch
<manifest>-hash-fix-<random>is created - Changes are commited
- New PR is created from this branch
- New branch
- There is PR already
- Labels
hash-fix-needed,verifiedare added
- Pull requests with name
- No problem
- Comment on issue is posted about hashes being right and possible causes
- Label
hash-fix-neededis removed - Issue is closed
- Binary error
- Label
manifest-fix-neededis added
- Label
- Hash mismatch
- Download failed
- All urls defined in manifest are retrieved
- Downloading of all urls is executed
- Comment to issue is posted
- If there is problematic URL
- List of these URLs is attached in comment
- Labels
manifest-fix-needed,verified,help wantedare added
- All URLs could be downloaded without problem
- Possible causes are attached in comment
- If there is problematic URL
- Decompression/Extraction error
- Comment to issue is posted
- 如果问题描述中提及了一个或多个特定的提取工具名称(7zip|msi|innounp|dark) 1. 仅会在评论中添加相关的提取帮助提示 1. 问题描述中未提及任何特定的提取工具名称 1. 所有提取帮助提示都会添加在评论中
Pull Requests
一旦 PR 被创建 或 以 /verify 开头的评论 被发布,验证测试将会执行(详见 wiki 获取详细说明):
验证器概述
- JSON 标准格式检查
- 必需属性(
License、Description)已就位 - 文件哈希值正确
- Checkver 功能
- Autoupdate 功能
- 哈希提取完成
所有操作的示例工作流
- 名称可按需更改
if语句不是必需的- 在查找合适的操作日志时,它们只是节省时间的工具
- 节省 GitHub 资源
#.github\workflows\schedule.yml
on:
schedule:
- cron: '*/30 * * * *'
name: Excavator
jobs:
excavate:
name: Excavator
runs-on: windows-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Excavator
uses: ScoopInstaller/GithubActions@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_UPDATED: '1'
#.github\workflows\issues.yml
on:
issues:
types: [ opened, labeled ]
name: Issue
jobs:
issueHandler:
name: Issue Handler
runs-on: windows-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Issue Handler
uses: ScoopInstaller/GithubActions@main
if: github.event.action == 'opened' || (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'verify'))
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#.github\workflows\issue_commented.yml
on:
issue_comment:
types: [ created ]
name: Commented Pull Request
jobs:
pullRequestHandler:
name: Pull Request Validator
runs-on: windows-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Pull Request Validator
uses: ScoopInstaller/GithubActions@main
if: startsWith(github.event.comment.body, '/verify')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#.github\workflows\pull_request.yml
on:
pull_request:
types: [ opened ]
name: Pull Requests
jobs:
pullRequestHandler:
name: Pull Request Validator
runs-on: windows-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Pull Request Validator
uses: ScoopInstaller/GithubActions@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
许可证
该项目以 MIT 许可证发布。