-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.28 KB
/
pipeline.yaml
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
43
44
45
46
47
48
49
50
51
52
53
name: Pipeline
on:
push:
branches: master
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: npm ci
- run: npm run build
bump:
needs: test
name: Bump version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # Fetch code
with:
ref: ${{ github.ref }}
- name: "Automated Version Bump"
uses: "phips28/gh-action-bump-version@master"
with:
tag-prefix: ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
name: Publish Docker image
needs: bump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo "::set-env name=RELEASE_VERSION::$(jq -r .version package.json)"
- name: Publish Docker image
uses: elgohr/[email protected]
with:
# The name of the image you would like to push
name: tuuturu/eme-notes-frontend/eme-note-frontend
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
tags: latest,${{ env.RELEASE_VERSION }}