Skip to content

Commit

Permalink
github: updated eden.yml to fix blanks:end of line
Browse files Browse the repository at this point in the history
Signed-off-by: yash-zededa <[email protected]>
  • Loading branch information
yash-zededa committed Aug 30, 2024
1 parent 118b35f commit f7a56ce
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/eden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,11 @@ jobs:
run: |
# Get the list of modified files
PR_API_URL="${{ github.event.pull_request._links.self.href }}/files"
RESPONSE=$(curl -s -H "Authorization: token $GITHUB_TOKEN" $PR_API_URL)
# Check if the response is valid JSON
echo "$RESPONSE" | jq . > /dev/null || exit 1
MODIFIED_FILES=$(echo "$RESPONSE" | jq -r '.[].filename')
NON_MD_FILES=$(echo "$MODIFIED_FILES" | grep -v '\.md$' || true)
if [ -z "$NON_MD_FILES" ]; then
echo "All files are Markdown (.md) files."
echo "only_md=true" >> $GITHUB_ENV
Expand All @@ -65,11 +60,9 @@ jobs:
- name: Print the head SHA
run: |
echo ${{ github.event.pull_request.head.sha }}
- name: Print pull request url
run: |
echo ${{ github.event.pull_request._links.self.href }}
- name: Get run ID for the artifact upload
id: get_run_id
env:
Expand All @@ -78,13 +71,11 @@ jobs:
RESPONSE=$(curl -s -L "https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yml/runs?head_sha=${{ github.event.pull_request.head.sha }}&status=success" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json")
# Check if RESPONSE is empty
if [ -z "$RESPONSE" ]; then
echo "API call returned no response."
exit 1
fi
RUN_ID=$(echo $RESPONSE | jq -r '.workflow_runs[0].id')
# Check if the RUN_ID is empty
if [ "$RUN_ID" == "null" ] || [ -z "$RUN_ID" ]; then
Expand Down

0 comments on commit f7a56ce

Please sign in to comment.