-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add installer to release asset issue - #139 #149
Changes from 4 commits
33aa04c
dc3d146
7771337
76b5d2d
f3cd0d8
a6d8ba7
3659310
768d258
e8c14e7
c03f4e6
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 |
---|---|---|
|
@@ -151,14 +151,17 @@ RUN mamba run -n streamlit-env python hooks/hook-analytics.py | |
# Set Online Deployment | ||
RUN jq '.online_deployment = true' settings.json > tmp.json && mv tmp.json settings.json | ||
|
||
# Download latest OpenMS App executable for Windows from Github actions workflow. | ||
# Download latest OpenMS App executable for Windows from GitHub Releases | ||
RUN if [ -n "$GH_TOKEN" ]; then \ | ||
echo "GH_TOKEN is set, proceeding to download the release asset..."; \ | ||
gh run download -R ${GITHUB_USER}/${GITHUB_REPO} $(gh run list -R ${GITHUB_USER}/${GITHUB_REPO} -b main -e push -s completed -w "Build executable for Windows" --json databaseId -q '.[0].databaseId') -n OpenMS-App --dir /app; \ | ||
gh release download -R ${GITHUB_USER}/${GITHUB_REPO} -p "OpenMS-App.zip" -D /app; \ | ||
unzip /app/OpenMS-App.zip -d /app/OpenMS-App && \ | ||
rm /app/OpenMS-App.zip; \ | ||
else \ | ||
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. 💡 Verification agent 🧩 Analysis chainImproved release asset handling. The update to use Let's confirm the GitHub CLI command is correctly formatted: 🏁 Script executed: #!/bin/bash
# Verify the `gh release download` command syntax
gh release download --help | grep -E "(-p|--pattern)"
# Check if unzip is available in the base image
apt list --installed | grep unzip || echo "unzip might not be installed in the base image" Length of output: 525 Release Asset Handling Verified; Ensure 'unzip' is Present |
||
echo "GH_TOKEN is not set, skipping the release asset download."; \ | ||
fi | ||
|
||
|
||
# Run app as container entrypoint. | ||
EXPOSE $PORT | ||
ENTRYPOINT ["/app/entrypoint.sh"] |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -97,14 +97,17 @@ RUN mamba run -n streamlit-env python hooks/hook-analytics.py | |||||||||||||||||||||||||||||||||
# Set Online Deployment | ||||||||||||||||||||||||||||||||||
RUN jq '.online_deployment = true' settings.json > tmp.json && mv tmp.json settings.json | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# Download latest OpenMS App executable for Windows from Github actions workflow. | ||||||||||||||||||||||||||||||||||
# Download latest OpenMS App executable for Windows from GitHub Releases | ||||||||||||||||||||||||||||||||||
RUN if [ -n "$GH_TOKEN" ]; then \ | ||||||||||||||||||||||||||||||||||
echo "GH_TOKEN is set, proceeding to download the release asset..."; \ | ||||||||||||||||||||||||||||||||||
gh run download -R ${GITHUB_USER}/${GITHUB_REPO} $(gh run list -R ${GITHUB_USER}/${GITHUB_REPO} -b main -e push -s completed -w "Build executable for Windows" --json databaseId -q '.[0].databaseId') -n OpenMS-App --dir /app; \ | ||||||||||||||||||||||||||||||||||
gh release download -R ${GITHUB_USER}/${GITHUB_REPO} -p "OpenMS-App.zip" -D /app; \ | ||||||||||||||||||||||||||||||||||
unzip /app/OpenMS-App.zip -d /app/OpenMS-App && \ | ||||||||||||||||||||||||||||||||||
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. See Dockerfile |
||||||||||||||||||||||||||||||||||
rm /app/OpenMS-App.zip; \ | ||||||||||||||||||||||||||||||||||
else \ | ||||||||||||||||||||||||||||||||||
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. 💡 Verification agent 🧩 Analysis chainImproved release asset handling. The updated approach to download release assets using Checking for missing dependencies that might be needed for the unzip operation: 🏁 Script executed: #!/bin/bash
# Check if unzip is installed in the base image
grep -E "apt-get install.*unzip" Dockerfile_simple || echo "unzip might not be explicitly installed"
# Check the base image for unzip
docker run --rm ubuntu:22.04 which unzip || echo "unzip is not available in the base image by default" Length of output: 445 Missing The updated asset download approach using
📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||
echo "GH_TOKEN is not set, skipping the release asset download."; \ | ||||||||||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
# make sure that mamba environment is used | ||||||||||||||||||||||||||||||||||
SHELL ["mamba", "run", "-n", "streamlit-env", "/bin/bash", "-c"] | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
|
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 should be removed as the download button expects the zipped asset.