-
Notifications
You must be signed in to change notification settings - Fork 123
Cleanup (Server) #1 - Tasks: A-2, 6, 7, 8 #983
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: master
Are you sure you want to change the base?
Changes from all commits
33bd8d5
96a8213
c1917c4
f2f344c
3a01028
14b3247
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 @@ | ||
| SERVER_IMAGE_TAG=2024-09-20--06-45 | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,13 +18,21 @@ jobs: | |||||||||||||||
|
|
||||||||||||||||
| steps: | ||||||||||||||||
| - uses: actions/checkout@v2 | ||||||||||||||||
|
|
||||||||||||||||
| - name: Set docker image tags | ||||||||||||||||
| id: set-tags | ||||||||||||||||
| run: | | ||||||||||||||||
| set -a; source .env; set +a | ||||||||||||||||
| echo "SERVER_IMAGE_TAG=${SERVER_IMAGE_TAG}" >> "$GITHUB_OUTPUT" | ||||||||||||||||
| echo "Current server image tag (push): ${SERVER_IMAGE_TAG}" | ||||||||||||||||
|
|
||||||||||||||||
|
Comment on lines
+22
to
+28
|
||||||||||||||||
| - name: Set docker image tags | |
| id: set-tags | |
| run: | | |
| set -a; source .env; set +a | |
| echo "SERVER_IMAGE_TAG=${SERVER_IMAGE_TAG}" >> "$GITHUB_OUTPUT" | |
| echo "Current server image tag (push): ${SERVER_IMAGE_TAG}" | |
Copilot
AI
Apr 4, 2026
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.
The generated tag timestamp format uses %Y-%m-%d--%M-%S (minute/second) but omits the hour, which can cause tag collisions across different hours on the same day (e.g., 01:05:30 vs 02:05:30). Include the hour in the format (e.g., %H-%M-%S) to guarantee uniqueness as intended.
| run: echo "date=$(date +'%Y-%m-%d--%M-%S')" >> "$GITHUB_OUTPUT" | |
| run: echo "date=$(date +'%Y-%m-%d--%H-%M-%S')" >> "$GITHUB_OUTPUT" |
Copilot
AI
Apr 4, 2026
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.
This workflow is triggered on push and then makes a commit and git push back to the same branch. That will re-trigger the workflow and can create an infinite loop of builds/commits. Add a guard (e.g., on.push.paths-ignore for .env, or an if: condition to skip when github.actor is the actions bot / commit message contains a skip marker) so the bot update doesn’t retrigger the pipeline.
Copilot
AI
Apr 4, 2026
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.
The workflow pushes a commit with the default GITHUB_TOKEN, but the workflow does not declare permissions: contents: write. On repos with restricted default permissions this git push will fail. Explicitly set the needed workflow/job permissions and push the correct ref (e.g., HEAD:${GITHUB_REF_NAME}) to avoid failures due to detached HEAD or branch ambiguity.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,8 @@ | ||||||
| # python 3 | ||||||
| FROM ubuntu:jammy-20240227 | ||||||
|
|
||||||
| MAINTAINER K. Shankari (k.shankari@nlr.gov) | ||||||
|
||||||
| MAINTAINER K. Shankari (k.shankari@nlr.gov) | |
| LABEL org.opencontainers.image.authors="K. Shankari (k.shankari@nlr.gov)" |
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.
The committed
.envvalue (SERVER_IMAGE_TAG=2024-09-20--06-45) doesn’t match the new<branch>_<timestamp>format that the workflow writes. Consider updating the checked-in baseline to the same format to avoid confusion and to ensuresource .envproduces a realistic tag value.