From 41e33cee710013132b21b82de0eb4d7dae1c31ab Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Sun, 27 Jan 2019 00:14:12 +0000 Subject: [PATCH] debug: want to know args to entry file --- Dockerfile | 3 +++ cli.js | 7 +++++++ entrypoint.sh | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cd9d067..d509dfe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM node:10-slim +RUN "apt-get install git" + LABEL version="1.0.0" LABEL repository="http://github.com/mikeal/merge-release" LABEL homepage="http://github.com/merge-release" @@ -12,6 +14,7 @@ LABEL com.github.actions.color="red" COPY LICENSE README.md / COPY "entrypoint.sh" "/entrypoint.sh" +COPY cli.js /cli.js ENTRYPOINT ["/entrypoint.sh"] CMD ["help"] diff --git a/cli.js b/cli.js index 3fead47..10f31d4 100644 --- a/cli.js +++ b/cli.js @@ -1,7 +1,14 @@ #!/usr/bin/env node +console.log(process.argv) + const fs = require('fs') const { execSync } = require('child_process') +/* Configure git */ + +//fs.writeFileSync('git-credentials') +//execSync('git + const event = JSON.parse(fs.readFileSync('/github/workflow/event.json').toString()) let messages = event.commits.map(commit => commit.message) diff --git a/entrypoint.sh b/entrypoint.sh index b30b52b..1ac3de9 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,4 +12,4 @@ if [ -n "$NPM_AUTH_TOKEN" ]; then chmod 0600 "$NPM_CONFIG_USERCONFIG" fi -sh -c "npx merge-release $*" +sh -c "node cli.js $*"