Skip to content

Delete Artifact URL in PR #1126

Delete Artifact URL in PR

Delete Artifact URL in PR #1126

# pr-comment-artifact-url.yml
---
name: Delete Artifact URL in PR
on:
workflow_run:
types:
- "requested"
workflows:
- "Unity Cloud Build"
branches-ignore:
- "main"
permissions:
contents: read
pull-requests: write
jobs:
delete-comment:
runs-on: ubuntu-latest
steps:
- name: Get PR info
env:
WORKFLOW_RUN_EVENT_OBJ: ${{ toJSON(github.event.workflow_run) }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
run: |
PR_NUMBER=$(jq -r '.pull_requests[0].number' \
<<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "Pull request Number: $PR_NUMBER"
echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV"
- name: Find Comment
uses: peter-evans/find-comment@v2
id: find-comment
with:
issue-number: ${{ env.PR_NUMBER }}
comment-author: 'github-actions[bot]'
- name: Update Comment
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ env.PR_NUMBER }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
body: |-
![badge] <img src="https://ui.decentraland.org/decentraland_256x256.png" width="30">
New build in progress, come back later!
[badge]: https://img.shields.io/badge/Build-Pending!-ffff00?logo=github&style=for-the-badge