From f08aa344e7a27afba292d1622ef8e1735bdbaa3c Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Tue, 12 Nov 2019 19:23:34 +0100 Subject: [PATCH 1/3] Skip Docker in manifest --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 5e84a87..fa36f42 100644 --- a/action.yml +++ b/action.yml @@ -24,5 +24,5 @@ inputs: required: false default: '.' runs: - using: 'docker' - image: 'Dockerfile' + using: 'bash' + main: 'start.sh' From d3c5a1eaede6992610c8886c78f6860fc6f5f7ed Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Tue, 12 Nov 2019 19:29:07 +0100 Subject: [PATCH 2/3] Use nodejs to start bash --- action.yml | 4 ++-- start.js | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 start.js diff --git a/action.yml b/action.yml index fa36f42..e583178 100644 --- a/action.yml +++ b/action.yml @@ -24,5 +24,5 @@ inputs: required: false default: '.' runs: - using: 'bash' - main: 'start.sh' + using: 'node12' + main: 'start.js' \ No newline at end of file diff --git a/start.js b/start.js new file mode 100644 index 0000000..2043c27 --- /dev/null +++ b/start.js @@ -0,0 +1,13 @@ +const spawn = require('child_process').spawn; + +const main = () => new Promise((resolve, reject) => { + const ssh = spawn('bash', ['start.sh'], { stdio: 'inherit' }); + ssh.on('close', resolve); + ssh.on('error', reject); +}); + +main().catch(err => { + console.err(err); + console.err(err.stack); + process.exit(-1); +}) \ No newline at end of file From 0dbc0a9736f05deffd9e9648cd33daf936daa0a6 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Tue, 12 Nov 2019 19:30:56 +0100 Subject: [PATCH 3/3] Drop Docker image --- .github/workflows/build.yml | 2 -- Dockerfile | 16 ---------------- 2 files changed, 18 deletions(-) delete mode 100644 Dockerfile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c15c7d..1abd4be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,8 +10,6 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Build Docker image - run: docker build . --tag my-image-name:$(date +%s) - name: Verify action syntax # The action should not publish any real changes, but should succeed. uses: './' diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 1f9883e..0000000 --- a/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM alpine - -LABEL "name"="github-push" -LABEL "maintainer"="Adam Dobrawy " -LABEL "version"="0.0.1" - -LABEL "com.github.actions.name"="Git push for GitHub Actions" -LABEL "com.github.actions.description"="Runs 'git push' to GitHub in an Action" -LABEL "com.github.actions.icon"="upload-cloud" -LABEL "com.github.actions.color"="green" - -COPY README.md LICENSE start.sh / - -RUN apk add --no-cache git - -CMD ["/start.sh"]