Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9347ab75c | ||
|
|
b0a6d2e94f | ||
|
|
250f0ba420 | ||
|
|
cfae6bb512 | ||
|
|
720b3bbf12 | ||
|
|
cb4016eda8 | ||
|
|
1a73179465 | ||
|
|
e62d5a56e4 | ||
|
|
6815912b18 | ||
|
|
c78ef253a1 |
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@@ -21,9 +21,21 @@ jobs:
|
|||||||
# - run: yarn build:lib
|
# - run: yarn build:lib
|
||||||
|
|
||||||
- name: generate-snake-game-from-github-contribution-grid
|
- name: generate-snake-game-from-github-contribution-grid
|
||||||
|
id: snake-gif
|
||||||
uses: Platane/snk@master
|
uses: Platane/snk@master
|
||||||
with:
|
with:
|
||||||
github_user_name: platane
|
github_user_name: platane
|
||||||
|
|
||||||
|
# - uses: crazy-max/ghaction-github-pages@v2.1.1
|
||||||
|
# with:
|
||||||
|
# target_branch: gh-pages
|
||||||
|
# build_dir: packages/demo/dist
|
||||||
|
# env:
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN_GH_PAGES }}
|
||||||
|
|
||||||
|
- run: ls
|
||||||
|
- run: ls -l github-contribution-grid-snake.gif
|
||||||
|
- run: ls -l ${{ steps.snake-gif.outputs.gif_out_path }}
|
||||||
|
- run: ls
|
||||||
- run: ls
|
- run: ls
|
||||||
- run: ls
|
- run: ls
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,4 +2,5 @@ node_modules
|
|||||||
npm-debug.log*
|
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,16 @@ 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);
|
||||||
|
|
||||||
|
console.log(`::set-output name=gif_out_path::${gifOutPath}`);
|
||||||
} 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