We leverage GitHub Actions to provide continuous integration and delivery of all TeaCon Jiachen participant mods.
.github/workflows/query.yaml
描述。.github/workflows/
目录下创建新的 Workflow,并在 mods
下创建对应的目录。
对于已有信息的队伍,将会更新其在 mods
目录下的信息(Git Repo 地址、HEAD shasum 等)setup.gradle
会作为参赛项目的 Init Script 注入到构建流程中。publish.sh
脚本,将构建产物上传至 TeaCon 归档服务,
并通知碧螺春有新构建产生。failure-callback.sh
脚本,透过碧螺春向对应报名队伍的队长发送电邮通知,
告知其构建失败。fetch/query.py
轮询脚本的主体。
Main/entry script of the scheduled query.
fetch/workflow_template.yaml
轮询时自动创建的新 GitHub Action Workflow 的模板,基于 Python 的 string.Template
。
Template used for automatically creating new GitHub Action Workflows duringa query.
Based on Python's string.Template
.
fetch/auth.sh
用于 GitHub App 的 Authentication。
在 GitHub Action 中,为防止意外触发无限递归的 Workflow Run,GitHub 默认提供的 ${{ github.TOKEN }}
不能用于创建新的 Workflow
(即没有 workflow:write
权限)。
为此我们需要使用其他身份来推送自动创建的 Workflow,这里我们使用的是我们自己的 GitHub App。
Used for GitHub App Authentication.
In GitHub Action, the default, GitHub-provided ${{ github.TOKEN }}
cannot be used for creating new workflows
(i.e. does not have workflow:write
permission), for sake of avoiding accidential recursive workflow runs.
To automatically create new workflows, we need to autheticate as other identities; here, we authenticate as
our GitHub App.
fetch/commit_info.sh
设定创建并推送新提交时所用的作者信息。
Set author info used for creating and pushing new commits.
mods/teacon-jiachen-[team-id]/remote
指定队伍的 Git 仓库的地址。
Address (URI) pointed to the git repo of the designated team.
mods/teacon-jiachen-[team-id]/HEAD
指定队伍的 Git 仓库的最新提交的校验和。
Checksum of the git repo of the designated team.
build/build.sh
启动 Gradle 构建所需的核心脚本。
Core script used for authoring a Gradle build.
build/setup.gradle
构建参赛项目时使用的 Gradle Init Script,用于:
Gradle Init Script used for:
build/mods_toml.py
检查构建产物的 Mod ID 是否与碧螺春中登记的一致的脚本。
Script that checks whether the mod ID extracted from build artifact is the same as what we record in Biluochun.
build/pre-server-test.sh
在 DSLT 启动之前的脚本,用于下载所有必须前置模组。
Script run before DSLT, for fetching necessary dependencies.
build/publish.sh
参赛项目构建成功后使用的脚本,用于:
Script used after successfully building participating projects. It is responible of
构建失败不一定意味着被构建的项目有问题,还有可能是龙井系统本身的问题。这样的情况已经出现过不止一次了。 如果你确定龙井本身有问题,欢迎在我们的问题追踪器内反馈。或是直接向我们发起 PR。
A build failure does not implies that the project being built has issue(s); it could very well be an issue inside Longjing. There have been cases where issues from Longjing itself cause build failures. If you believe that Longjing itself is causing issues, feel free to report in our issue tracker. Pull requests are more than welcome.