File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ FROM ubuntu:22.04 AS setup-build-system
1111ARG OPENMS_REPO=https://github.com/OpenMS/OpenMS.git
1212ARG OPENMS_BRANCH=release/3.5.0
1313ARG PORT=8501
14- # GitHub token to download latest OpenMS executable for Windows from Github action artifact.
15- ARG GITHUB_TOKEN
16- ENV GH_TOKEN=${GITHUB_TOKEN}
1714# Streamlit app Gihub user name (to download artifact from).
1815ARG GITHUB_USER=OpenMS
1916# Streamlit app Gihub repository name (to download artifact from).
@@ -227,12 +224,14 @@ RUN mamba run -n streamlit-env python hooks/hook-analytics.py
227224# Set Online Deployment
228225RUN jq '.online_deployment = true' settings.json > tmp.json && mv tmp.json settings.json
229226
230- # Download latest OpenMS App executable as a ZIP file
231- RUN if [ -n "$GH_TOKEN" ]; then \
232- echo "GH_TOKEN is set, proceeding to download the release asset..." ; \
227+ # Download latest OpenMS App executable as a ZIP file.
228+ # ARG declared here (not at the top) — otherwise the per-run token busts the cache.
229+ ARG GITHUB_TOKEN
230+ RUN if [ -n "$GITHUB_TOKEN" ]; then \
231+ echo "GITHUB_TOKEN is set, proceeding to download the release asset..." ; \
233232 gh release download -R ${GITHUB_USER}/${GITHUB_REPO} -p "OpenMS-App.zip" -D /app; \
234233 else \
235- echo "GH_TOKEN is not set, skipping the release asset download." ; \
234+ echo "GITHUB_TOKEN is not set, skipping the release asset download." ; \
236235 fi
237236
238237
Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ FROM ubuntu:22.04 AS stage1
1111ARG OPENMS_REPO=https://github.com/OpenMS/OpenMS.git
1212ARG OPENMS_BRANCH=develop
1313ARG PORT=8501
14- # GitHub token to download latest OpenMS executable for Windows from Github action artifact.
15- ARG GITHUB_TOKEN
16- ENV GH_TOKEN=${GITHUB_TOKEN}
1714# Streamlit app Gihub user name (to download artifact from).
1815ARG GITHUB_USER=OpenMS
1916# Streamlit app Gihub repository name (to download artifact from).
@@ -139,12 +136,14 @@ RUN mamba run -n streamlit-env python hooks/hook-analytics.py
139136# Set Online Deployment
140137RUN jq '.online_deployment = true' settings.json > tmp.json && mv tmp.json settings.json
141138
142- # Download latest OpenMS App executable as a ZIP file
143- RUN if [ -n "$GH_TOKEN" ]; then \
144- echo "GH_TOKEN is set, proceeding to download the release asset..."; \
139+ # Download latest OpenMS App executable as a ZIP file.
140+ # ARG declared here (not at the top) — otherwise the per-run token busts the cache.
141+ ARG GITHUB_TOKEN
142+ RUN if [ -n "$GITHUB_TOKEN" ]; then \
143+ echo "GITHUB_TOKEN is set, proceeding to download the release asset..."; \
145144 gh release download -R ${GITHUB_USER}/${GITHUB_REPO} -p "OpenMS-App.zip" -D /app; \
146145 else \
147- echo "GH_TOKEN is not set, skipping the release asset download."; \
146+ echo "GITHUB_TOKEN is not set, skipping the release asset download."; \
148147 fi
149148
150149# make sure that mamba environment is used
You can’t perform that action at this time.
0 commit comments