Skip to content

Commit

Permalink
feat(workflow): notify github bot deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemain committed Aug 29, 2023
1 parent 9bd3ae1 commit 824117a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/constants/opensumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export const workflowAboutRelease = new Set([
export const VERSION_SYNC_KEYWORD = 'versionInfo';

export const SYNC_TO_NPM_NAME = 'sync to npmmirror';
export const BOT_DEPLOY_PRE_NAME = 'Deploy to Pre';
export const BOT_DEPLOY_NAME = 'Deploy to Prod';

export const MONTHLY_REPORT_FILE = 'monthly-report.yml';
export const PR_NEXT_RELEASE_FILE = 'release-next.yml';
Expand Down
8 changes: 7 additions & 1 deletion src/github/templates/workflow.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { Octokit } from '@octokit/rest';

import { SYNC_TO_NPM_NAME, workflowAboutRelease } from '@/constants/opensumi';
import {
BOT_DEPLOY_NAME,
BOT_DEPLOY_PRE_NAME,
SYNC_TO_NPM_NAME,
workflowAboutRelease,
} from '@/constants/opensumi';
import { StringBuilder } from '@/utils';

import { Context, ExtractPayload, MarkdownContent } from '../types';
Expand Down Expand Up @@ -71,6 +76,7 @@ export async function handleWorkflowRun(
const mapping = {
'opensumi/actions': new Set([SYNC_TO_NPM_NAME]),
'opensumi/core': workflowAboutRelease,
'opensumi/github-bot': new Set([BOT_DEPLOY_PRE_NAME, BOT_DEPLOY_NAME]),
} as Partial<Record<string, Set<string>>>;

const repoAllow = mapping[repository.full_name];
Expand Down

0 comments on commit 824117a

Please sign in to comment.