60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: docker_dev
|
|
|
|
on:
|
|
push:
|
|
branches: [ dev ]
|
|
pull_request:
|
|
branches: [ dev ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Check out the repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache node modules NPM
|
|
uses: actions/cache@v2
|
|
env:
|
|
cache-name: cache-node-modules-NPM
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./Inotify.Vue/package.json') }}
|
|
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./Inotify.Vue/package.json') }}
|
|
|
|
- name: Cache node modules
|
|
uses: actions/cache@v2
|
|
env:
|
|
cache-name: cache-node-modules
|
|
with:
|
|
path: ./Inotify.Vue/node_modules
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./Inotify.Vue/package.json') }}
|
|
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./Inotify.Vue/package.json') }}
|
|
|
|
- name: InstallNode and BuildVue
|
|
run: |
|
|
cd ./Inotify.Vue
|
|
npm install
|
|
npm run build:prod
|
|
|
|
-
|
|
name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
-
|
|
name: Docker Build & Push to Docker Hub For Service
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
file: ./Inotify/Dockerfile
|
|
platforms: linux/amd64
|
|
push: true
|
|
tags: ${{ secrets.DOCKERHUB_TAG }}:dev
|
|
|
|
- name: 'Report Suecss'
|
|
run: curl ${{ secrets.INOTIFY }}/Inotify/DevIsOk!
|