mirror of
https://github.com/peter-evans/create-or-update-comment.git
synced 2025-01-18 19:22:44 +08:00
Replace set-output
This commit is contained in:
parent
2b2c85d0bf
commit
aef100f6b4
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -40,9 +40,9 @@ jobs:
|
||||
- id: vars
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then \
|
||||
echo "::set-output name=issue-number::${{ github.event.number }}"; \
|
||||
echo "issue-number=${{ github.event.number }}" >> $GITHUB_OUTPUT; \
|
||||
else \
|
||||
echo "::set-output name=issue-number::1"; \
|
||||
echo "issue-number=1" >> $GITHUB_OUTPUT; \
|
||||
fi
|
||||
|
||||
test:
|
||||
|
4
.github/workflows/test-command.yml
vendored
4
.github/workflows/test-command.yml
vendored
@ -12,10 +12,10 @@ jobs:
|
||||
run: |
|
||||
repository=${{ github.event.client_payload.slash_command.repository }}
|
||||
if [[ -z "$repository" ]]; then repository=${{ github.repository }}; fi
|
||||
echo ::set-output name=repository::$repository
|
||||
echo "repository=$repository" >> $GITHUB_OUTPUT
|
||||
branch=${{ github.event.client_payload.slash_command.branch }}
|
||||
if [[ -z "$branch" ]]; then branch="main"; fi
|
||||
echo ::set-output name=branch::$branch
|
||||
echo "branch=$branch" >> $GITHUB_OUTPUT
|
||||
|
||||
# Checkout the branch to test
|
||||
- uses: actions/checkout@v3
|
||||
|
@ -168,7 +168,7 @@ The content must be [escaped to preserve newlines](https://github.community/t/se
|
||||
body="${body//'%'/'%25'}"
|
||||
body="${body//$'\n'/'%0A'}"
|
||||
body="${body//$'\r'/'%0D'}"
|
||||
echo "::set-output name=body::$body"
|
||||
echo "body=$body" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create comment
|
||||
uses: peter-evans/create-or-update-comment@v2
|
||||
|
Loading…
x
Reference in New Issue
Block a user