-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (35 loc) · 996 Bytes
/
docker-image.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
name: Docker Build CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
env:
ID: ${{secrets.DOCKERID}}
SECRET: ${{secrets.DOCKERPASSWORD}}
IMAGE : "jalalhejazi/angular-automation-2022"
name: Build on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['14']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Docker Login
uses: docker/login-action@v1.10.0
with:
username: ${{env.ID}}
password: ${{env.SECRET}}
- name: Software Build "npm | docker"
run: |
npm install --silent
npm run build --if-present
docker build . --file dockerfile --tag ${{env.IMAGE}}:latest
docker push ${{env.IMAGE}}