Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit 5ce8c4d

Browse files
committed
Merge branch 'develop', prepare 6.2.0
2 parents 21a6ab9 + 4083f0d commit 5ce8c4d

32 files changed

+6092
-7691
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"trailingComma": "es5",
1616
"singleQuote": true,
1717
"bracketSpacing": false,
18-
"printWidth": 120
18+
"printWidth": 120,
19+
"arrowParens": "avoid"
1920
}
2021
]
2122
}

.github/workflows/prerelease.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Prerelease
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
env:
9+
YARN_CACHE_FOLDER: ~/.yarn
10+
IMAGE_NAME: exoframe/server
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/cache@v1
18+
with:
19+
path: ${{ env.YARN_CACHE_FOLDER }}
20+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
21+
restore-keys: |
22+
${{ runner.os }}-yarn-
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: '12.x'
26+
registry-url: https://registry.npmjs.org
27+
- name: install
28+
run: yarn --frozen-lockfile
29+
30+
# lint, test, report coverage
31+
- name: lint
32+
run: yarn lint
33+
- name: test
34+
run: yarn test
35+
36+
# upload coverage
37+
- name: Coveralls
38+
uses: coverallsapp/github-action@master
39+
with:
40+
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
42+
publish:
43+
needs: test
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
- uses: actions/cache@v1
48+
with:
49+
path: ${{ env.YARN_CACHE_FOLDER }}
50+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
51+
restore-keys: |
52+
${{ runner.os }}-yarn-
53+
- uses: actions/setup-node@v1
54+
with:
55+
node-version: '12.x'
56+
registry-url: https://registry.npmjs.org
57+
58+
# build
59+
- name: install
60+
run: yarn --frozen-lockfile
61+
- name: build
62+
run: yarn build
63+
64+
# bump version & commit it
65+
- run: npm version prerelease --preid=dev --no-git-tag-version
66+
- name: setup git
67+
run: |
68+
git config user.email "[email protected]"
69+
git config user.name "$GITHUB_ACTOR"
70+
- name: commit new version to develop
71+
run: |
72+
git add -A
73+
git commit -m "Bump version for @next release"
74+
git push "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY"
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
78+
# deploy to npm
79+
- run: npm publish --access public
80+
env:
81+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
82+
83+
# build docker image and deploy to hub
84+
- name: Login to DockerHub Registry
85+
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
86+
- name: Build & push docker image
87+
run: |
88+
REF=${GITHUB_REF##*/}
89+
TAG=$REF
90+
DEBUG_TAG="debug_$TAG"
91+
VERSION=$(node -pe "require('./package.json').version")
92+
93+
echo REF=$GITHUB_REF
94+
echo TAG=$TAG
95+
echo DEBUG_TAG=$DEBUG_TAG
96+
echo IMAGE_NAME=$IMAGE_NAME
97+
echo VERSION=$VERSION
98+
99+
# Build docker image
100+
docker build -f docker/Dockerfile --quiet --cache-from $IMAGE_NAME:$TAG --label "version=$VERSION" -t $IMAGE_NAME:$TAG .
101+
102+
# Build debug docker image
103+
docker build -f docker/Dockerfile.debug --quiet --cache-from $IMAGE_NAME:$DEBUG_TAG --label "version=$VERSION" -t $IMAGE_NAME:$DEBUG_TAG .
104+
105+
# if git action = tag
106+
if [[ "$GITHUB_REF" == "refs/tags/"* ]]; then
107+
docker tag $IMAGE_NAME:$TAG $IMAGE_NAME:latest
108+
docker tag $IMAGE_NAME:$TAG $IMAGE_NAME:debug_latest
109+
else
110+
echo "No tag, skipping"
111+
fi
112+
113+
# Push all images to registry
114+
docker push $IMAGE_NAME

.github/workflows/release.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
env:
9+
YARN_CACHE_FOLDER: ~/.yarn
10+
IMAGE_NAME: exoframe/server
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/cache@v1
18+
with:
19+
path: ${{ env.YARN_CACHE_FOLDER }}
20+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
21+
restore-keys: |
22+
${{ runner.os }}-yarn-
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: '12.x'
26+
registry-url: https://registry.npmjs.org
27+
- name: install
28+
run: yarn --frozen-lockfile
29+
30+
# lint, test, report coverage
31+
- name: lint
32+
run: yarn lint
33+
- name: test
34+
run: yarn test
35+
36+
# upload coverage
37+
- name: Coveralls
38+
uses: coverallsapp/github-action@master
39+
with:
40+
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
42+
publish:
43+
needs: test
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
- uses: actions/cache@v1
48+
with:
49+
path: ${{ env.YARN_CACHE_FOLDER }}
50+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
51+
restore-keys: |
52+
${{ runner.os }}-yarn-
53+
- uses: actions/setup-node@v1
54+
with:
55+
node-version: '12.x'
56+
registry-url: https://registry.npmjs.org
57+
58+
# build
59+
- name: install
60+
run: yarn --frozen-lockfile
61+
- name: build
62+
run: yarn build
63+
64+
# deploy to npm
65+
- run: npm publish --access public
66+
env:
67+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
68+
69+
# build docker image and deploy to hub
70+
- name: Login to DockerHub Registry
71+
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
72+
- name: Build & push docker image
73+
run: |
74+
REF=${GITHUB_REF##*/}
75+
TAG=$REF
76+
DEBUG_TAG="debug_$TAG"
77+
VERSION=$(node -pe "require('./package.json').version")
78+
79+
echo REF=$GITHUB_REF
80+
echo TAG=$TAG
81+
echo DEBUG_TAG=$DEBUG_TAG
82+
echo IMAGE_NAME=$IMAGE_NAME
83+
echo VERSION=$VERSION
84+
85+
# Build docker image
86+
docker build -f docker/Dockerfile --quiet --cache-from $IMAGE_NAME:$TAG --label "version=$VERSION" -t $IMAGE_NAME:$TAG .
87+
88+
# Build debug docker image
89+
docker build -f docker/Dockerfile.debug --quiet --cache-from $IMAGE_NAME:$DEBUG_TAG --label "version=$VERSION" -t $IMAGE_NAME:$DEBUG_TAG .
90+
91+
# if git action = tag
92+
if [[ "$GITHUB_REF" == "refs/tags/"* ]]; then
93+
docker tag $IMAGE_NAME:$TAG $IMAGE_NAME:latest
94+
docker tag $IMAGE_NAME:$TAG $IMAGE_NAME:debug_latest
95+
else
96+
echo "No tag, skipping"
97+
fi
98+
99+
# Push all images to registry
100+
docker push $IMAGE_NAME

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test
2+
3+
# test on every push and on PRs
4+
on:
5+
push:
6+
branches: '*'
7+
pull_request:
8+
9+
env:
10+
YARN_CACHE_FOLDER: ~/.yarn
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/cache@v1
18+
with:
19+
path: ${{ env.YARN_CACHE_FOLDER }}
20+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
21+
restore-keys: |
22+
${{ runner.os }}-yarn-
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: '12.x'
26+
registry-url: https://registry.npmjs.org
27+
- name: install
28+
run: yarn --frozen-lockfile
29+
30+
# lint, test, report coverage
31+
- name: lint
32+
run: yarn lint
33+
- name: test
34+
run: yarn test
35+
36+
# upload coverage
37+
- name: Coveralls
38+
uses: coverallsapp/github-action@master
39+
with:
40+
github-token: ${{ secrets.GITHUB_TOKEN }}

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"trailingComma": "es5",
33
"singleQuote": true,
44
"bracketSpacing": false,
5-
"printWidth": 120
5+
"printWidth": 120,
6+
"arrowParens": "avoid"
67
}

.travis.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
> Simple Docker deployment tool
44
5-
[![Build Status](https://travis-ci.org/exoframejs/exoframe-server.svg?branch=master)](https://travis-ci.org/exoframejs/exoframe-server)
5+
[![CI: Test](https://github.com/exoframejs/exoframe-server/workflows/Test/badge.svg)](https://github.com/exoframejs/exoframe-server/actions?query=workflow%3ATest)
6+
[![CI: Release](https://github.com/exoframejs/exoframe-server/workflows/Release/badge.svg)](https://github.com/exoframejs/exoframe-server/actions?query=workflow%3ARelease)
67
[![Coverage Status](https://coveralls.io/repos/github/exoframejs/exoframe-server/badge.svg?branch=master)](https://coveralls.io/github/exoframejs/exoframe-server?branch=master)
78
[![Docker Pulls](https://img.shields.io/docker/pulls/exoframe/server.svg)](https://hub.docker.com/r/exoframe/server/)
89
[![Docker image size](https://images.microbadger.com/badges/image/exoframe/server.svg)](https://microbadger.com/images/exoframe/server)
@@ -14,6 +15,20 @@ Exoframe is a self-hosted tool that allows simple one-command deployments using
1415

1516
For more details on how to get it up and running please follow the following link [how to setup exoframe-server](https://github.com/exoframejs/exoframe/tree/master/docs).
1617

18+
## Development
19+
20+
```bash
21+
# Start the development setup:
22+
yarn docker:start
23+
24+
# Run something inside of the exoframe container:
25+
yarn docker:exec [command]
26+
27+
# Test your code:
28+
yarn lint
29+
yarn test
30+
```
31+
1732
## License
1833

1934
Licensed under MIT.

docker/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
data/
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)