mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
[Workflow: Build] Add backend url env
This commit is contained in:
@@ -5,6 +5,7 @@ env:
|
||||
BACKEND_IMAGE_NAME: nowdb-backend
|
||||
FRONTEND_IMAGE_NAME: nowdb-frontend
|
||||
|
||||
|
||||
jobs:
|
||||
push_backend:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -26,10 +27,13 @@ jobs:
|
||||
|
||||
# This changes all uppercase characters to lowercase.
|
||||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||
|
||||
# This strips the git ref prefix from the version.
|
||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
|
||||
# This strips the "v" prefix from the tag name.
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||
|
||||
VERSION=latest
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo VERSION=$VERSION
|
||||
@@ -42,8 +46,11 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
- name: Build image
|
||||
env:
|
||||
VITE_BACKEND_URL: ${{ secrets.BACKEND_URL }}
|
||||
|
||||
run: docker build frontend --tag $FRONTEND_IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
|
||||
|
||||
- name: Log in to registry
|
||||
|
||||
Reference in New Issue
Block a user