build image
This commit is contained in:
parent
c2a338e426
commit
6ec92d8311
19
.github/workflows/docker-image-development.yml
vendored
19
.github/workflows/docker-image-development.yml
vendored
@ -14,6 +14,20 @@ jobs:
|
|||||||
if: contains(github.event.head_commit.message, 'build image')
|
if: contains(github.event.head_commit.message, 'build image')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 14
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Set Version Tag
|
||||||
|
run: |
|
||||||
|
version=$(npm version patch)
|
||||||
|
echo "Version Tag: $version"
|
||||||
|
echo "::set-output name=version_tag::$version"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Docker Hub Login
|
- name: Docker Hub Login
|
||||||
env:
|
env:
|
||||||
@ -23,8 +37,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build . -t defuj/apkt-eis
|
docker build . -t defuj/apkt-eis:dev-${{ steps.set_version.outputs.version_tag }}
|
||||||
docker image tag defuj/apkt-eis defuj/apkt-eis:dev-$(date +%s)
|
docker push defuj/apkt-eis:dev-${{ steps.set_version.outputs.version_tag }}
|
||||||
docker push defuj/apkt-eis:dev-$(date +%s)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
FROM node:lts-alpine as build-stage
|
FROM node:lts-alpine as build-stage
|
||||||
|
ARG VERSION=0.0.1
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
@ -14,7 +14,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: apkt-eis
|
- name: apkt-eis
|
||||||
image: docker.io/defuj/apkt-eis:dev-1705378929
|
image: docker.io/apkt-eis:dev-0.0.1
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
---
|
---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user