Skip to content

ApprovalComment

ApprovalComment #4030

name: ApprovalComment
on:
pull_request_review:
types: [submitted]
jobs:
approval-comment:
if: startsWith(github.event.review.body, '/karpenter snapshot') || startsWith(github.event.review.body, '/karpenter alpha-scale') || startsWith(github.event.review.body, '/karpenter scale') || startsWith(github.event.review.body, '/karpenter versionCompatibility')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Save info about the review comment as an artifact for other workflows that run on workflow_run to download them
env:
REVIEW_BODY: ${{ github.event.review.body }}
run: |
mkdir -p /tmp/artifacts
{ echo "$REVIEW_BODY"; echo ${{ github.event.pull_request.number }}; echo ${{ github.event.review.commit_id }}; } >> /tmp/artifacts/metadata.txt
cat /tmp/artifacts/metadata.txt
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: /tmp/artifacts