gh actions complete
This commit is contained in:
parent
6f3a7a6864
commit
98600ad5f6
@ -54,9 +54,9 @@ build_deps() {
|
|||||||
|
|
||||||
build_base() {
|
build_base() {
|
||||||
set -eux; \
|
set -eux; \
|
||||||
cd $DIR/server; go get; ./build; \
|
cd $DIR/server; go get -v -t -d . ; ./build; \
|
||||||
cd $DIR/client; npm install; npm run build; \
|
cd $DIR/client; npm install; npm run build; \
|
||||||
sudo docker build -f files/base/Dockerfile -t nurdism/neko:base $DIR ;
|
cd $DIR; sudo docker build -f .docker/files/base/Dockerfile -t nurdism/neko:base $DIR ;
|
||||||
}
|
}
|
||||||
|
|
||||||
build_firefox() {
|
build_firefox() {
|
||||||
@ -93,6 +93,7 @@ set -ex
|
|||||||
case $1 in
|
case $1 in
|
||||||
push) build_push ;;
|
push) build_push ;;
|
||||||
docker) build_docker ;;
|
docker) build_docker ;;
|
||||||
|
base) build_base ;;
|
||||||
deps) build_deps ;;
|
deps) build_deps ;;
|
||||||
dev) build_dev ;;
|
dev) build_dev ;;
|
||||||
gst) build_gst ;;
|
gst) build_gst ;;
|
||||||
|
29
.github/workflows/build.yml
vendored
Normal file
29
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: n.eko build
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: nurdism/neko:dev
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Fetch unshallow
|
||||||
|
run: git fetch --prune --tags --unshallow
|
||||||
|
|
||||||
|
- name: Get go dependencies and build server
|
||||||
|
working-directory: server
|
||||||
|
run: |
|
||||||
|
go get -v -t -d .
|
||||||
|
./build
|
||||||
|
|
||||||
|
- name: Get npm dependencies and build Client
|
||||||
|
working-directory: client
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
@ -1,12 +1,12 @@
|
|||||||
name: N.eko CI
|
name: n.eko auto deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
deploy:
|
||||||
name: Build
|
name: Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: nurdism/neko:dev
|
container: nurdism/neko:dev
|
||||||
steps:
|
steps:
|
||||||
@ -18,11 +18,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Get go dependencies and build server
|
- name: Get go dependencies and build server
|
||||||
working-directory: server
|
working-directory: server
|
||||||
run: go get -v -t -d ./... && ./build
|
run: |
|
||||||
|
go get -v -t -d .
|
||||||
|
./build
|
||||||
|
|
||||||
- name: Get npm dependencies and build Client
|
- name: Get npm dependencies and build Client
|
||||||
working-directory: client
|
working-directory: client
|
||||||
run: npm install && npm run build
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
|
||||||
- name: Build the base image
|
- name: Build the base image
|
||||||
run: docker build -f ./.docker/files/base/Dockerfile -t nurdism/neko:base .
|
run: docker build -f ./.docker/files/base/Dockerfile -t nurdism/neko:base .
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
BUILD_TIME=`date -u +'%Y-%m-%dT%H:%M:%SZ'`
|
BUILD_TIME=`date -u +'%Y-%m-%dT%H:%M:%SZ'`
|
||||||
GIT_COMMIT=`git rev-parse --short HEAD`
|
GIT_COMMIT=`git rev-parse --short HEAD`
|
||||||
GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
|
GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
|
||||||
|
Reference in New Issue
Block a user