mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 04:57:17 +01:00
Merge branch 'dev' into CIAdjustments
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
name: 'Master Merge'
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [CI Pipeline]
|
||||
types:
|
||||
- completed
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DEV_PUSH_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
|
||||
|
||||
jobs:
|
||||
master-merge:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.DEV_PUSH_TOKEN }}
|
||||
|
||||
- name: Merge master into dev
|
||||
uses: robotology/gh-action-nightly-merge@14b4a4cf358f7479aa708bee05cf8a794d6a2516 #v1.5.0
|
||||
@@ -28,4 +31,3 @@ jobs:
|
||||
push_token: DEV_PUSH_TOKEN
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DEV_PUSH_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
|
||||
|
||||
@@ -1628,7 +1628,7 @@ package (version) distribution(s); urgency=urgency
|
||||
return 0;
|
||||
}
|
||||
|
||||
static async ValueTask<int> CICompletionCheck(GitHubClient gitHubClient, string currentSha, string pemBase64)
|
||||
static async ValueTask GenerateAppCredentials(GitHubClient gitHubClient, string pemBase64)
|
||||
{
|
||||
var pemBytes = Convert.FromBase64String(pemBase64);
|
||||
var pem = Encoding.UTF8.GetString(pemBytes);
|
||||
@@ -1657,10 +1657,15 @@ package (version) distribution(s); urgency=urgency
|
||||
var installToken = await gitHubClient.GitHubApps.CreateInstallationToken(installation.Id);
|
||||
|
||||
gitHubClient.Credentials = new Credentials(installToken.Token);
|
||||
}
|
||||
|
||||
static async ValueTask<int> CICompletionCheck(GitHubClient gitHubClient, string currentSha, string pemBase64)
|
||||
{
|
||||
await GenerateAppCredentials(gitHubClient, pemBase64);
|
||||
|
||||
await gitHubClient.Check.Run.Create(RepoOwner, RepoName, new NewCheckRun("CI Completion", currentSha)
|
||||
{
|
||||
CompletedAt = now,
|
||||
CompletedAt = DateTime.UtcNow,
|
||||
Conclusion = CheckConclusion.Success,
|
||||
Output = new NewCheckRunOutput("CI Completion", "The CI Pipeline completed successfully"),
|
||||
Status = CheckStatus.Completed,
|
||||
|
||||
Reference in New Issue
Block a user