Repository navigation
113 lines (96 loc) · 2.91 KB
/
Copy pathcd-workflow.yml
File metadata and controls
113 lines (96 loc) · 2.91 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Continuous Deployment - App
on:
push:
branches: [ dev-scale-out ]
create:
tags:
- 'v*.*.*'
jobs:
deploy:
name: Development Release
if: github.event_name == 'push' && contains(github.ref, 'dev-scale-out')
runs-on: ubuntu-latest
env:
NG_CLI_ANALYTICS: ci
GOPROXY: "https://proxy.golang.org"
NODE_OPTIONS: "--max-old-space-size=8192"
DOCKER_CLI_EXPERIMENTAL: enabled
TERM: xterm
steps:
- name: Setup Environment
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Docker Login
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15.1
- name: Setup NodeJS
uses: actions/setup-node@v2.1.2
with:
node-version: 12.6.0
- name: Cache Node Modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
shell: bash
run: |
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.js && go mod download
- name: Push Image
shell: bash
run: |
export GOPATH=$(go env GOPATH)/bin
npm run docker:push:head
release:
name: Release
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
env:
NG_CLI_ANALYTICS: ci
GOPROXY: "https://proxy.golang.org"
NODE_OPTIONS: "--max-old-space-size=8192"
DOCKER_CLI_EXPERIMENTAL: enabled
TERM: xterm
steps:
- name: Setup Environment
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Docker Login
env:
DOCKER_USER: ${{ secrets.DOCKER_RELEASE_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_RELEASE_PASS }}
run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15.1
- name: Setup NodeJS
uses: actions/setup-node@v2.1.2
with:
node-version: 12.6.0
- name: Cache Node Modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
shell: bash
run: |
[ ! -d "node_modules" ] && npm ci || node aio/scripts/version.js && go mod download
- name: Push Image
shell: bash
run: |
export GOPATH=$(go env GOPATH)/bin
npm run docker:push