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')
|
||||
|
||||
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
|
||||
- name: Docker Hub Login
|
||||
env:
|
||||
@ -23,8 +37,7 @@ jobs:
|
||||
|
||||
- name: Build the Docker image
|
||||
run: |
|
||||
docker build . -t defuj/apkt-eis
|
||||
docker image tag defuj/apkt-eis defuj/apkt-eis:dev-$(date +%s)
|
||||
docker push defuj/apkt-eis:dev-$(date +%s)
|
||||
docker build . -t defuj/apkt-eis:dev-${{ steps.set_version.outputs.version_tag }}
|
||||
docker push defuj/apkt-eis:dev-${{ steps.set_version.outputs.version_tag }}
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
FROM node:lts-alpine as build-stage
|
||||
ARG VERSION=0.0.1
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
@ -14,7 +14,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: apkt-eis
|
||||
image: docker.io/defuj/apkt-eis:dev-1705378929
|
||||
image: docker.io/apkt-eis:dev-0.0.1
|
||||
ports:
|
||||
- containerPort: 80
|
||||
---
|
||||
|
Loading…
x
Reference in New Issue
Block a user