This repository was archived by the owner on Jun 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 2323 - name : Fetch latest FE commit SHA
2424 id : fetch_commit_fe_sha
2525 run : |
26- echo "LATEST_COMMIT_SHA=$(curl -LSsk 'https://api.github.com/repos/stacklok/codegate-ui/commits?per_page=1' -H 'Authorization: Bearer ${{ secrets.GH_CI_TOKEN }}' | jq -r '.[0].sha')" >> $GITHUB_ENV
26+ echo "LATEST_RELEASE=$(curl -s "https://api.github.com/repos/stacklok/codegate-ui/releases/latest" -H "Authorization: Bearer ${{ secrets.GH_CI_TOKEN }}" | grep '"zipball_url":' | cut -d '"' -f 4)" >> $GITHUB_ENV
27+ echo "Fetched LATEST_RELEASE: $LATEST_RELEASE"
2728 - name : Test build on x86
2829 id : docker_build
2930 uses : docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v5
3839 secrets : |
3940 gh_token=${{ secrets.GH_CI_TOKEN }}
4041 build-args : |
41- LATEST_COMMIT_SHA =${{ env.LATEST_COMMIT_SHA }}
42+ LATEST_RELEASE =${{ env.LATEST_RELEASE }}
Original file line number Diff line number Diff line change 6666 - name : Fetch latest FE commit SHA
6767 id : fetch_commit_fe_sha
6868 run : |
69- echo "LATEST_COMMIT_SHA =$(curl -LSsk ' https://api.github.com/repos/stacklok/codegate-ui/commits?per_page=1' -H ' Authorization: Bearer ${{ secrets.GH_CI_TOKEN }}' | jq -r '.[0].sha' )" >> $GITHUB_ENV
70- echo "Fetched LATEST_COMMIT_SHA : $LATEST_COMMIT_SHA "
69+ echo "LATEST_RELEASE =$(curl -s " https://api.github.com/repos/stacklok/codegate-ui/releases/latest" -H " Authorization: Bearer ${{ secrets.GH_CI_TOKEN }}" | grep '"zipball_url":' | cut -d '"' -f 4 )" >> $GITHUB_ENV
70+ echo "Fetched LATEST_RELEASE : $LATEST_RELEASE "
7171 - name : Rename to accommodate to image
7272 run : mv ./backup_weaviate ./weaviate_backup
7373 - name : Download git lfs dependencies
8888 secrets : |
8989 gh_token=${{ secrets.GH_CI_TOKEN }}
9090 build-args : |
91- LATEST_COMMIT_SHA =${{ env.LATEST_COMMIT_SHA }}
91+ LATEST_RELEASE =${{ env.LATEST_RELEASE }}
9292 - name : Capture Image Digest
9393 id : image-digest
9494 run : |
Original file line number Diff line number Diff line change @@ -32,11 +32,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3232
3333WORKDIR /usr/src/
3434
35+ # To ensure we always download the latest release of the webapp, we use a build argument.
36+ # This prevents the curl command from being cached by Docker.
37+ ARG LATEST_RELEASE=LATEST
38+ RUN echo "Latest FE release: $LATEST_RELEASE"
3539RUN --mount=type=secret,id=gh_token \
36- curl -s -H "Authorization: Bearer $(cat /run/secrets/gh_token)" https://api.github.com/repos/stacklok/codegate-ui/releases/latest \
37- | grep '"zipball_url":' \
38- | cut -d '"' -f 4 \
39- | xargs -n 1 -I {} curl -L -H "Authorization: Bearer $(cat /run/secrets/gh_token)" -o main.zip {}
40+ LATEST_RELEASE=${LATEST_RELEASE} \
41+ curl -L -H "Authorization: Bearer $(cat /run/secrets/gh_token)" -o main.zip ${LATEST_RELEASE}
4042
4143# Extract the downloaded zip file
4244RUN unzip main.zip
You can’t perform that action at this time.
0 commit comments