Skip to content

Commit

Permalink
rename GIT_REF to APP_VERSION and link to SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Jan 24, 2024
1 parent 9c68d14 commit 248e2c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
GIT_REF=${{ steps.docker_meta.outputs.tags.first || github.ref_name }}
APP_VERSION=${{ steps.docker_meta.outputs.tags.first || github.ref_name }}
GIT_SHA=${{ github.sha }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ FROM ruby:3.2-alpine3.18 AS build
RUN apk add --no-cache tzdata alpine-sdk postgresql-dev nodejs yarn xz libarchive mesa-gl glfw
RUN gem install foreman

ARG GIT_REF
ARG APP_VERSION
ARG GIT_SHA

ENV PORT=3214
ENV RACK_ENV=production
ENV RAILS_ENV=production
ENV NODE_ENV=production
ENV RAILS_SERVE_STATIC_FILES=true
ENV GIT_REF=${GIT_REF}
ENV APP_VERSION=${APP_VERSION}
ENV GIT_SHA=${GIT_SHA}

WORKDIR /usr/src/app
Expand Down
4 changes: 3 additions & 1 deletion app/views/application/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<ul class="list-unstyled small text-muted">
<li class="mb-2">Designed and built by <a href="https://floppy.org.uk">James</a> with help from <a href="https://github.com/manyfold3d/manyfold/graphs/contributors">our contributors</a>.</li>
<li class="mb-2">Open Source under the <a href="https://github.com/manyfold3d/manyfold/blob/main/LICENSE.md" target="_blank" rel="license noopener">MIT license</a>.</li>
<li class="mb-2">Version: <%= link_to ENV.fetch("GIT_REF", "unknown"), "https://github.com/manyfold3d/manyfold/tree/#{ENV.fetch ("GIT_SHA", "main")}"%></li>
<li class="mb-2">Version: <%= link_to "#{ENV.fetch("APP_VERSION", "unknown")} (#{ENV.fetch ("GIT_SHA", "main")[0,7]})",
"https://github.com/manyfold3d/manyfold/tree/#{ENV.fetch ("GIT_SHA", "main")}"%>
</li>
</ul>
</div>
<div class="col-4 col-lg-2 mb-3">
Expand Down

0 comments on commit 248e2c8

Please sign in to comment.