-
Notifications
You must be signed in to change notification settings - Fork 2
proof of concept for setting version number env variable #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: paige-docker-testing
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||
| name: Build Docker Image on Release | ||||||
|
|
||||||
| on: | ||||||
| push | ||||||
|
|
||||||
| # on: | ||||||
| # release: | ||||||
| # types: [published] | ||||||
|
|
||||||
| jobs: | ||||||
| build: | ||||||
| runs-on: ubuntu-latest | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we run on:
We may also have partners on Ubuntu 20.04 LTS, which is now EOL, but I don't think we'll be dockerizing them - instead we'll migrate. |
||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Set version | ||||||
| run: echo "APP_VERSION=${GITHUB_REF_NAME#v}" >> .env | ||||||
|
||||||
| run: echo "APP_VERSION=${GITHUB_REF_NAME#v}" >> .env | |
| run: echo "APP_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -237,7 +237,7 @@ | |
| TINYMCE_FILEBROWSER = False | ||
|
|
||
| # Add Version to the admin site header | ||
| VERSION = "2.2.2" | ||
| VERSION = os.getenv("APP_VERSION", "unknown") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like if this is launched any way other than with Docker (looking at this variable in |
||
| ADMIN_SITE_HEADER = os.environ.get( | ||
| "ADMIN_SITE_HEADER", default="ITK DB Admin v{}".format(VERSION) | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,8 @@ services: | |
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
| args: | ||
| APP_VERSION: ${APP_VERSION} | ||
|
Comment on lines
+24
to
+25
|
||
| restart: unless-stopped | ||
| depends_on: | ||
| - db | ||
|
|
@@ -35,6 +37,7 @@ services: | |
| SQL_PASSWORD: postgrespw | ||
| SECRET_KEY: 'change-me' | ||
| DEBUG: '0' | ||
| APP_VERSION: ${APP_VERSION} | ||
| ports: | ||
| - "8000:8000" | ||
| volumes: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing colon after
push. Theontrigger syntax requires a colon. This should be:or to trigger on all pushes:
The current syntax is invalid and will cause the workflow to fail.