Skip to content

Commit

Permalink
fix build version and commit short sha
Browse files Browse the repository at this point in the history
  • Loading branch information
genox committed Mar 21, 2023
1 parent 4fd5226 commit 4413d46
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
npm --version
yarn --version
node ./scripts/updatePackageJsonVersion.js $CI_COMMIT_SHORT_SHA
node ./scripts/updatePackageJsonVersion.js ${{github.ref_name}}
yarn workspaces focus
yarn run lint
yarn run build
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add COMMIT_SHORT_SHA env property
run: echo "COMMIT_SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
Expand All @@ -23,6 +25,8 @@ jobs:
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}:frontend"
build-args: |
LASIUS_VERSION=${{github.ref_name}}
push: true
tags: tegonal/lasius-frontend:${{github.ref_name}}

Expand All @@ -31,6 +35,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add COMMIT_SHORT_SHA env property
run: echo "COMMIT_SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
Expand Down
2 changes: 2 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM tegonal/jelastic-openjdk:17

LABEL git-commit=$COMMIT_SHORT_SHA

ADD ./target/universal/*.zip artifact.zip

EXPOSE 9000
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM node:18 AS builder
ENV NEXT_TELEMETRY_DISABLED 1

ARG LASIUS_VERSION
LABEL git-commit=$CI_COMMIT_SHORT_SHA
LABEL git-commit=$COMMIT_SHORT_SHA

WORKDIR /app

Expand Down

0 comments on commit 4413d46

Please sign in to comment.