-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.1 KB
/
main.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
32
33
34
35
36
37
38
39
40
41
42
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Install
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Build
run: yarn build
cd:
runs-on: ubuntu-latest
needs: ci
steps:
- uses: actions/checkout@v2
- name: Docker login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Docker build
run: docker build -t editor .
- name: Docker tag image
run: |
docker tag editor ${{ secrets.DOCKER_USER }}/metadata-editor:${{ github.sha }}
docker tag editor ${{ secrets.DOCKER_USER }}/metadata-editor:latest
- name: Docker push
run: |
docker push ${{ secrets.DOCKER_USER }}/metadata-editor:${{ github.sha }}
docker push ${{ secrets.DOCKER_USER }}/metadata-editor:latest