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 +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 23
23
- name : Fetch latest FE commit SHA
24
24
id : fetch_commit_fe_sha
25
25
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
27
- name : Test build on x86
28
28
id : docker_build
29
29
uses : docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v5
38
38
secrets : |
39
39
gh_token=${{ secrets.GH_CI_TOKEN }}
40
40
build-args : |
41
- LATEST_COMMIT_SHA =${{ env.LATEST_COMMIT_SHA }}
41
+ LATEST_RELEASE =${{ env.LATEST_RELEASE }}
Original file line number Diff line number Diff line change 66
66
- name : Fetch latest FE commit SHA
67
67
id : fetch_commit_fe_sha
68
68
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
71
70
- name : Rename to accommodate to image
72
71
run : mv ./backup_weaviate ./weaviate_backup
73
72
- name : Download git lfs dependencies
88
87
secrets : |
89
88
gh_token=${{ secrets.GH_CI_TOKEN }}
90
89
build-args : |
91
- LATEST_COMMIT_SHA =${{ env.LATEST_COMMIT_SHA }}
90
+ LATEST_RELEASE =${{ env.LATEST_RELEASE }}
92
91
- name : Capture Image Digest
93
92
id : image-digest
94
93
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 \
32
32
33
33
WORKDIR /usr/src/
34
34
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"
35
39
RUN --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}
40
42
41
43
# Extract the downloaded zip file
42
44
RUN unzip main.zip
You can’t perform that action at this time.
0 commit comments