Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9347ab75c | ||
|
|
b0a6d2e94f | ||
|
|
250f0ba420 | ||
|
|
cfae6bb512 | ||
|
|
720b3bbf12 | ||
|
|
cb4016eda8 | ||
|
|
1a73179465 |
11
.github/workflows/main.yml
vendored
11
.github/workflows/main.yml
vendored
@@ -21,10 +21,21 @@ jobs:
|
||||
# - run: yarn build:lib
|
||||
|
||||
- name: generate-snake-game-from-github-contribution-grid
|
||||
id: snake-gif
|
||||
uses: Platane/snk@master
|
||||
with:
|
||||
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
|
||||
|
||||
17
Dockerfile
17
Dockerfile
@@ -5,12 +5,15 @@ RUN apt-get update \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY tsconfig.json package.json yarn.lock /github/platane.aa/
|
||||
COPY packages /github/platane.aa/
|
||||
COPY packages /github/platane.aa/packages
|
||||
|
||||
RUN ( cd /github/platane.aa/ ; yarn install --frozen-lockfile )
|
||||
|
||||
RUN ( cd /github/platane.aa/ ; yarn build:action )
|
||||
|
||||
CMD ["find", "/github"]
|
||||
# CMD ["node", "./generate-snake-game-from-github-contribution-grid/packages/action/dist/index.js"]
|
||||
RUN ( \
|
||||
cd /github/platane.aa \
|
||||
&& find . \
|
||||
&& yarn install --frozen-lockfile \
|
||||
&& yarn build:action \
|
||||
&& 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 () => {
|
||||
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"));
|
||||
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(userName);
|
||||
|
||||
const buffer = await generateContributionSnake(core.getInput("user_name"));
|
||||
fs.writeFileSync(core.getInput("gif_out_path"), buffer);
|
||||
console.log({ userName, gifOutPath }, buffer.length);
|
||||
|
||||
fs.writeFileSync(gifOutPath, buffer);
|
||||
|
||||
console.log(`::set-output name=gif_out_path::${gifOutPath}`);
|
||||
} catch (e) {
|
||||
core.setFailed(`Action failed with "${e.message}"`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user