diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a19a850..a6ef46e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image run: | - docker build --build-arg VERSION=${{ needs.release.outputs.new-release-version }} \ + docker build --build-arg BUILD_VERSION=${{ needs.release.outputs.new-release-version }} VERSION=${{ needs.release.outputs.new-release-version }} \ -t ghcr.io/${{ github.repository }}:${{ needs.release.outputs.new-release-version }} \ -t ghcr.io/${{ github.repository }}:latest . docker push ghcr.io/${{ github.repository }}:latest diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 23e85e3..3c431eb 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -10,3 +10,5 @@ services: - "3000:3000" env_file: - .env + environment: + - BUILD_VERSION=${BUILD_VERSION} diff --git a/next.config.mjs b/next.config.mjs index 00835c9..ee15efb 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -13,7 +13,7 @@ const nextConfig = { unoptimized: true, }, env: { - VERSION: version, + VERSION: process.env.BUILD_VERSION || version, }, };