🚀 create output directory
This commit is contained in:
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -38,8 +38,6 @@ jobs:
|
||||
needs: build-docker-image
|
||||
|
||||
steps:
|
||||
- run: mkdir dist
|
||||
|
||||
- name: generate-snake-game-from-github-contribution-grid
|
||||
id: snake-gif
|
||||
uses: Platane/snk@master
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import * as core from "@actions/core";
|
||||
import { generateContributionSnake } from "./generateContributionSnake";
|
||||
|
||||
@@ -16,10 +17,12 @@ import { generateContributionSnake } from "./generateContributionSnake";
|
||||
);
|
||||
|
||||
if (svg) {
|
||||
fs.mkdirSync(path.dirname(format.svg), { recursive: true });
|
||||
fs.writeFileSync(format.svg, svg);
|
||||
console.log(`::set-output name=svg_out_path::${format.svg}`);
|
||||
}
|
||||
if (gif) {
|
||||
fs.mkdirSync(path.dirname(format.gif), { recursive: true });
|
||||
fs.writeFileSync(format.gif, gif);
|
||||
console.log(`::set-output name=gif_out_path::${format.gif}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user