Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c11ed23

Browse files
committed
init
0 parents  commit c11ed23

File tree

9 files changed

+900
-0
lines changed

9 files changed

+900
-0
lines changed

.github/actions/jshint/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM node:11.6.0
2+
RUN npm install -g [email protected]
3+
ENTRYPOINT ["jshint"]

.github/main.workflow

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
workflow "test-and-deploy" {
2+
on = "push"
3+
resolves = "deploy"
4+
}
5+
6+
action "install" {
7+
uses = "docker://node:11.6.0"
8+
args = "npm install"
9+
}
10+
11+
action "test" {
12+
uses = "docker://node:11.6.0"
13+
args = "npm test"
14+
needs = ["install"]
15+
}
16+
17+
action "lint" {
18+
uses = "./.github/actions/jshint"
19+
needs = ["install"]
20+
}
21+
22+
action "branch-filter" {
23+
needs = ["test","lint"]
24+
uses = "actions/bin/filter@master"
25+
args = "branch master"
26+
}
27+
28+
action "deploy" {
29+
needs = ["branch-filter"]
30+
uses = "actions/bin/sh@master"
31+
args = ["echo Deploy with secret $PHONY_SECRET"]
32+
secrets = ["PHONY_SECRET"]
33+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
*.swp

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Casey Lee
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Overview
2+
Simple Node.js application to demonstrate the use of GitHub Actions

index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var express = require('express')
2+
var app = express()
3+
4+
app.get('/', function (req, res) {
5+
res.set('Content-Type', 'text/plain');
6+
res.send('Hello World')
7+
})
8+
9+
module.exports = app.listen(8080, function () {
10+
console.log('Listening on port 8080')
11+
})
12+

0 commit comments

Comments
 (0)