deskflow/.github/actions/run-tests-setup/action.yml
Nick Bolton 13bf2dace4
Only add PR comments for internal PR (#7448)
* Add write permission for issues

* Add write permission to PRs

* Update ChangeLog

* Fixed ChangeLog version

* Correct ChangeLog

* Remove GITHUB_TOKEN input

* Revert "Remove GITHUB_TOKEN input"

This reverts commit e868a8d3f4.

* Use COMMENT_PAT for GITHUB_TOKEN

* Use default permissions

* Only use `sticky-pull-request-comment` for internal PRs

* Update ChangeLog
2024-08-23 10:38:17 +01:00

35 lines
1.1 KiB
YAML

name: "Run tests (setup)"
description: "Sets up the PR comment for tests"
runs:
using: "composite"
steps:
- name: Get workflow URL
id: workflow-url
run: |
repo_url="${{ github.server_url }}/${{ github.repository }}"
echo "url=$repo_url/actions/runs/${{ github.run_id }}" >> $GITHUB_OUTPUT
shell: bash
- name: Begin PR comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event.pull_request.head.repo.full_name == github.repository
with:
header: tests
recreate: true
message: |
## Test results
See [workflow run](${{ steps.workflow-url.outputs.url }}) for test output.
# Neccesary since the first comment has an annoying comment.
- name: Append table header
uses: marocchino/sticky-pull-request-comment@v2
if: github.event.pull_request.head.repo.full_name == github.repository
with:
header: tests
append: true
message: |
| Job name | Unit tests | Integration tests |
| --- | --- | --- |