feat: saving json data for future use

This commit is contained in:
GitHub Actions
2021-06-24 00:02:40 +02:00
parent cee1906a39
commit 7ceb9cb783
5 changed files with 36 additions and 11 deletions

View File

@@ -1,11 +1,13 @@
import * as core from '@actions/core';
import { data } from 'remark';
import {
renderer,
paginate,
REPO_USERNAME,
generateMd,
pushNewFile,
pushNewFiles,
MARKDOWN_FILENAME,
} from './helpers';
import type { SortedLanguageList, Stars, Star } from './types';
@@ -41,7 +43,16 @@ export async function main(): Promise<any> {
const markdown: string = await generateMd(rendered);
await pushNewFile(markdown);
await pushNewFiles([
{
filename: MARKDOWN_FILENAME,
data: markdown,
},
{
filename: 'data.json',
data: JSON.stringify(sortedByLanguages, null, 2),
},
]);
}
export async function run(): Promise<any> {