File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 username : olabekkevold
2525 password : ${{ secrets.PAT }}
2626
27+ - name : Get version from package.json
28+ id : version
29+ run : |
30+ VERSION=$(jq -r '.version' ./labman/package.json)
31+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
32+ echo "Version: $VERSION"
33+
2734 - name : Determine image tag
2835 id : tag
2936 run : |
4350 tags : |
4451 ghcr.io/olabekkevold/labmanager:${{ steps.tag.outputs.env_tag }}
4552 ghcr.io/olabekkevold/labmanager:${{ github.sha }}
46-
47-
53+ build-args : |
54+ NEXT_PUBLIC_VERSION=${{ steps.version.outputs.VERSION }}
55+ NEXT_PUBLIC_ENV=${{ steps.tag.outputs.env_tag }}
56+
57+
58+
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ WORKDIR /app
2424COPY --from=deps /app/node_modules ./node_modules
2525COPY . .
2626
27+ ARG NEXT_PUBLIC_ENV
28+ ENV NEXT_PUBLIC_ENV=${NEXT_PUBLIC_ENV}
29+
30+ ARG NEXT_PUBLIC_VERSION
31+ ENV NEXT_PUBLIC_VERSION=${NEXT_PUBLIC_VERSION}
2732# Next.js collects completely anonymous telemetry data about general usage.
2833# Learn more here: https://nextjs.org/telemetry
2934# Uncomment the following line in case you want to disable telemetry during the build.
Original file line number Diff line number Diff line change 11{
22 "name" : " labman" ,
3- "version" : " 0.1 .0" ,
3+ "version" : " 1.0 .0" ,
44 "type" : " module" ,
55 "private" : true ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export default function Home() {
4242 </ form >
4343 </ div >
4444 </ div >
45- < p className = { "text-gray-300 text-2xl mb-3 ml-3 fixed bottom-0" } > v1.0.0-test </ p >
45+ < p className = { "text-gray-300 text-2xl mb-3 ml-3 fixed bottom-0" } > { process . env . NEXT_PUBLIC_VERSION } </ p >
4646 </ >
4747
4848
You can’t perform that action at this time.
0 commit comments