From 1505c37e4c8646661011a82b60269bbba7acca3d Mon Sep 17 00:00:00 2001 From: Scai <59282365+alexevladgabriel@users.noreply.github.com> Date: Wed, 8 Jan 2025 00:29:04 +0000 Subject: [PATCH] chore: comment fix issues --- .github/workflows/push.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index f1faf9c..0966ddc 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -68,6 +68,7 @@ jobs: path: bin/jetkvm_app comment: + name: Comment runs-on: ubuntu-latest needs: build steps: @@ -80,19 +81,19 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | ARTIFACT_ID=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts --jq '.artifacts[0].id') - echo "ARTIFACT_URL=https://github.com/${{ github.repository }}/actions/artifacts/$ARTIFACT_ID/zip" >> $GITHUB_ENV - echo "LATEST_COMMIT=${GIT_COMMIT:0:7}" >> $GITHUB_ENV + echo "ARTIFACT_URL=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/$ARTIFACT_ID" >> $GITHUB_ENV + echo "LATEST_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Comment on PR env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | # Markdown Table for Comment - COMMENT="✅ **Build succesfully for ${{ github.event.pull_request.title }}!**\n\n" + COMMENT="✅ **Build successfully for ${{ github.event.pull_request.title }}!**\n\n" COMMENT+="| Name | Link |\n" COMMENT+="|------|------|\n" COMMENT+="| 🔗 Debug Binary | [Download](${{ env.ARTIFACT_URL }}) |\n" - COMMENT+="| 🔗 Latest commit | [${{ env.LATEST_COMMIT }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) |\n" + COMMENT+="| 🔗 Latest commit | [${{ env.LATEST_COMMIT }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) |" # Post Comment gh pr comment ${{ github.event.pull_request.number }} --body "$COMMENT"