Skip to content

Commit 8f6d5dc

Browse files
Mahadik, Mukul ChandrakantMahadik, Mukul Chandrakant
authored andcommitted
Read raw file contents directly instead of using REST API
REST API endpoint returns base64 encoded data which then needs to be decoded. Can simply read the Raw file contents from the publicly available file.
1 parent 8f72539 commit 8f6d5dc

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

.github/workflows/image_build_push.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,8 @@ jobs:
2020
- name: Fetch server image tag
2121
id: get-server-tag
2222
run: |
23-
response=$(curl -s \
24-
-H "Authorization: Bearer ${{ secrets.GH_FG_PAT_TAGS }}" \
25-
-H "Accept: application/vnd.github+json" \
26-
-H "X-GitHub-Api-Version: 2022-11-28" \
27-
https://api.github.com/repos/MukuFlash03/e-mission-server/contents/.env?ref=cleanup-cicd)
28-
29-
content=$(echo "$response" | jq -r .content)
30-
decoded_content=$(echo "$content" | base64 --decode)
31-
SERVER_IMAGE_TAG=$(echo "$decoded_content" | grep "SERVER_IMAGE_TAG=" | cut -d'=' -f2)
23+
response=$(curl -s https://raw.githubusercontent.com/MukuFlash03/e-mission-server/refs/heads/cleanup-cicd/.env)
24+
SERVER_IMAGE_TAG=$(echo "$response" | grep "SERVER_IMAGE_TAG=" | cut -d'=' -f2)
3225
echo "SERVER_IMAGE_TAG=$SERVER_IMAGE_TAG" >> "$GITHUB_OUTPUT"
3326
3427
- name: Set docker image tags

0 commit comments

Comments
 (0)