Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.yml #14

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@ jobs:

- name: Get Pull Request Body
id: pr_body
run: |
BODY=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
${{ github.api_url }}/repos/${{ github.repository }}/pulls/${{ github.event.number }} \
| jq -r '.body')
echo "Pull Request Body: $BODY" # Debug
echo "BODY=$BODY" >> $GITHUB_ENV
uses: octokit/[email protected]
with:
route: GET /repos/:owner/:repo/pulls/:pull_number
owner: ${{ github.repository_owner }}
repo: ${{ github.repository }}
pull_number: ${{ github.event.number }}
headers: |
Authorization: token ${{ secrets.GITHUB_TOKEN }}

- name: Save Pull Request Body
run: echo "${{ steps.pr_body.outputs.data.body }}" > pr_body.txt

- name: Extract Version and Changes
id: extract_version_and_changes
run: |
VERSION_CHANGES=$(bash ./scripts/version.sh "${{ steps.pr_body.outputs.BODY }}")
VERSION_CHANGES=$(bash ./scripts/version.sh "$(cat pr_body.txt)")
echo "Extracted Version and Changes: $VERSION_CHANGES" # Debug message
echo "VERSION_CHANGES=$VERSION_CHANGES" >> $GITHUB_ENV

Expand Down
Loading