Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0a6d2e94f | ||
|
|
250f0ba420 | ||
|
|
cfae6bb512 | ||
|
|
720b3bbf12 | ||
|
|
cb4016eda8 | ||
|
|
1a73179465 | ||
|
|
e62d5a56e4 | ||
|
|
6815912b18 | ||
|
|
c78ef253a1 |
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -25,5 +25,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github_user_name: platane
|
github_user_name: platane
|
||||||
|
|
||||||
|
- run: ls
|
||||||
|
- run: ls -l github-contribution-grid-snake.gif
|
||||||
|
- run: ls -l
|
||||||
|
- run: ls
|
||||||
- run: ls
|
- run: ls
|
||||||
- run: ls
|
- run: ls
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ npm-debug.log*
|
|||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
dist
|
dist
|
||||||
build
|
build
|
||||||
|
out.gif
|
||||||
19
Dockerfile
19
Dockerfile
@@ -4,13 +4,16 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends gifsicle graphicsmagick \
|
&& apt-get install -y --no-install-recommends gifsicle graphicsmagick \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY tsconfig.json package.json yarn.lock ./platane-aa/
|
COPY tsconfig.json package.json yarn.lock /github/platane.aa/
|
||||||
COPY packages ./platane-aa/packages/
|
COPY packages /github/platane.aa/packages
|
||||||
|
|
||||||
RUN ( cd ./platane-aa ; yarn install --frozen-lockfile )
|
RUN ( \
|
||||||
|
cd /github/platane.aa \
|
||||||
RUN ( cd ./platane-aa ; yarn build:action )
|
&& find . \
|
||||||
|
&& yarn install --frozen-lockfile \
|
||||||
CMD ["find", "/github"]
|
&& yarn build:action \
|
||||||
# CMD ["node", "./generate-snake-game-from-github-contribution-grid/packages/action/dist/index.js"]
|
&& mv packages/action/dist/* . \
|
||||||
|
&& rm -rf packages tsconfig.json package.json yarn.lock node_modules \
|
||||||
|
)
|
||||||
|
|
||||||
|
CMD ["node", "/github/platane.aa/index.js"]
|
||||||
|
|||||||
@@ -4,23 +4,14 @@ import { generateContributionSnake } from "./generateContributionSnake";
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
console.log("argv", process.argv);
|
const userName = core.getInput("github_user_name");
|
||||||
|
const gifOutPath = core.getInput("gif_out_path");
|
||||||
|
|
||||||
console.log(core.getInput("user_name"));
|
const buffer = await generateContributionSnake(userName);
|
||||||
console.log(core.getInput("gif_out_path"));
|
|
||||||
console.log("--");
|
|
||||||
console.log("--");
|
|
||||||
console.log(process.cwd());
|
|
||||||
console.log("--");
|
|
||||||
console.log(fs.readdirSync(process.cwd()));
|
|
||||||
console.log("--");
|
|
||||||
console.log("--");
|
|
||||||
console.log(process.env.GITHUB_WORKSPACE);
|
|
||||||
console.log("--");
|
|
||||||
console.log(fs.readdirSync(process.cwd()));
|
|
||||||
|
|
||||||
const buffer = await generateContributionSnake(core.getInput("user_name"));
|
console.log({ userName, gifOutPath }, buffer.length);
|
||||||
fs.writeFileSync(core.getInput("gif_out_path"), buffer);
|
|
||||||
|
fs.writeFileSync(gifOutPath, buffer);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
core.setFailed(`Action failed with "${e.message}"`);
|
core.setFailed(`Action failed with "${e.message}"`);
|
||||||
}
|
}
|
||||||
|
|||||||
1
packages/gif-creator/.gitignore
vendored
1
packages/gif-creator/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
out.gif
|
|
||||||
Reference in New Issue
Block a user