-
-
Notifications
You must be signed in to change notification settings - Fork 372
31 lines (29 loc) · 1.08 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: build images
on:
push:
branches: ["master", "2.0", "next"]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
# - name: Cache npm Repository
# uses: actions/cache@v1
# with:
# path: ./node_modules
# key: jetlinks-ui-pro-repository
- name: Install 🔧
run: |
set NODE_OPTIONS=-max_old_space_size=8096
yarn install
yarn run build
cp -r dist docker/
docker build -t registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-pro:$(node -p "require('./package.json').version") ./docker
- name: Login Docker Repo
run: echo "${{ secrets.ALIYUN_DOCKER_REPO_PWD }}" | docker login registry.cn-shenzhen.aliyuncs.com -u ${{ secrets.ALIYUN_DOCKER_REPO_USERNAME }} --password-stdin
- name: Push Docker
run: docker push registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-pro:$(node -p "require('./package.json').version")