mirror of
https://github.com/alangrainger/immich-public-proxy.git
synced 2024-12-28 03:41:58 +00:00
Add app version to build
This commit is contained in:
parent
da5930fab1
commit
89c67a6423
3 changed files with 10 additions and 1 deletions
7
.github/workflows/ci.yaml
vendored
7
.github/workflows/ci.yaml
vendored
|
@ -21,6 +21,9 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get version from package.json
|
||||
run: echo "PACKAGE_VERSION=$(jq -r '.version' app/package.json)" >> $GITHUB_ENV
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
|
@ -47,6 +50,10 @@ jobs:
|
|||
file: Dockerfile
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
build-args: |
|
||||
PACKAGE_VERSION=${{ env.PACKAGE_VERSION }}
|
||||
tags: |
|
||||
${{ github.repository }}:latest
|
||||
${{ github.repository }}:${{ env.PACKAGE_VERSION }}
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ env.PACKAGE_VERSION }}
|
||||
|
|
|
@ -12,6 +12,8 @@ USER node
|
|||
|
||||
RUN npm install --omit=dev
|
||||
|
||||
ARG PACKAGE_VERSION
|
||||
ENV APP_VERSION=${PACKAGE_VERSION}
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Build without type checking, as we have removed the Typescript
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"scripts": {
|
||||
"dev": "ts-node src/index.ts",
|
||||
"build": "npx tsc",
|
||||
"test": "podman build --format docker -t immich-proxy-test .. && podman run --init -it -p=3000:3000 --env-file .env immich-proxy-test",
|
||||
"test": "podman build --build-arg PACKAGE_VERSION=$(npm pkg get version | xargs) --format docker -t immich-proxy-test .. && podman run --init -it -p=3000:3000 --env-file .env immich-proxy-test",
|
||||
"start": "node dist/index.js"
|
||||
},
|
||||
"author": "Alan Grainger",
|
||||
|
|
Loading…
Reference in a new issue