/
githubmirror
/
hexo
Обзор
Документация
Войти
/
githubmirror
/
hexo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.github/workflows/commenter.yml
72 строки
2 KB
Uiolee
ci(comment/flamegraph): change filename beacause actions/upload-artifact ignores hidden files (#5772)
09 июл 2026, 04:13
Не верифицирован
09 июл 2026, 04:13
3c3f217
Код
Авторство
О чём код?
name: Commenter on: pull_request_target: workflow_run: workflows: ["Benchmark"] types: - completed permissions: contents: read jobs: comment-test: name: How to test permissions: pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment runs-on: ubuntu-latest if: ${{github.event_name == 'pull_request_target'}} steps: - name: Comment PR - How to test uses: marocchino/sticky-pull-request-comment@v3 with: header: How to test message: | ## How to test ```sh git clone -b ${{ github.head_ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git cd hexo npm install npm test ``` comment-flamegraph: name: Flamegraph permissions: pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment actions: read # get artifact runs-on: ubuntu-latest if: ${{github.event_name == 'workflow_run' && github.event.workflow_run.conclusion=='success'}} env: comment_result: "tmp-comment-flamegraph.md" steps: - name: download artifact uses: actions/download-artifact@v8 with: github-token: ${{secrets.GITHUB_TOKEN}} run-id: ${{toJSON(github.event.workflow_run.id)}} pattern: "comment-*" merge-multiple: true - name: get PR number run: | echo "pr_number=$(cat tmp-comment-pr_number)" >> "$GITHUB_ENV" - name: combime comment if: ${{env.pr_number!=''}} run: | echo "## Flamegraph" > ${{env.comment_result}} echo "" >> ${{env.comment_result}} cat tmp-comment-flamegraph-*.md >> ${{env.comment_result}} - name: Comment PR - flamegraph if: ${{env.pr_number!=''}} uses: marocchino/sticky-pull-request-comment@v3 with: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} number: ${{env.pr_number}} header: Flamegraph path: ${{env.comment_result}}