admin管理员组文章数量:1123766
I am using Flutter web with Firebase and want to post preview url as a comment on Pull Request. I tried several ways and finally when I hard code the pr number its working. This is how I have it now.
name: Deploy to Firebase Hosting on PR
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Step to install Flutter
- name: Install Flutter
run: |
git clone .git -b stable
echo "$GITHUB_WORKSPACE/flutter/bin" >> $GITHUB_PATH
# Run the build command
- name: Build the app
run: npm run build
# Deploy to Firebase Hosting
- name: Deploy to Firebase Hosting
uses: FirebaseExtended/[email protected]
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_XXXXXX }}
projectId: XXXXX-dev
# Comment on PR with Preview Link
- name: Comment on PR with Preview Link
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-d '{"body": "Preview link: ;}' \
"/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
How can I create a dynamic link with the PR number. Thanks for the advice. How can I create a dynamic link with the PR number. Thanks for the advice. How can I create a dynamic link with the PR number. Thanks for the advice.
本文标签: flutterWhy am I unable to post preview url as comment on Github Pull requestStack Overflow
版权声明:本文标题:flutter - Why am I unable to post preview url as comment on Github Pull request? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736593442a1945112.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论