Skip to content

Commit

Permalink
chore: add dynamic version detection
Browse files Browse the repository at this point in the history
in the past it was forgotten to increase the version file on a new release.
This logic now automatically uses the docker tag as new version info
  • Loading branch information
janz93 committed Dec 11, 2024
1 parent 3b29597 commit b3188e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
APP_VERSION=${{ steps.meta.outputs.tags }}
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM ruby:3.3.2-slim
ARG DOCKER_TAG
ENV APP_VERSION=$DOCKER_TAG

RUN apt-get update && apt-get install -y git supervisor build-essential zlib1g-dev libpq-dev curl

# throw errors if Gemfile has been modified since Gemfile.lock
Expand Down
2 changes: 1 addition & 1 deletion config/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Box
def self.version
"1.3.32"
ENV["APP_VERSION"].to_s
end
end

0 comments on commit b3188e1

Please sign in to comment.