test(maas): add ephemeral API key cleanup tests #7700
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://stackoverflow.com/questions/67247752/how-to-use-secret-in-pull-request-review-similar-to-pull-request-target | |
| name: Dummy Workflow on review | |
| on: | |
| pull_request_review: | |
| types: [submitted, edited] | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| issues: write | |
| jobs: | |
| dummy-workflow: | |
| if: | | |
| github.event.pull_request != '' && | |
| !contains(github.event.sender.login, 'coderabbitai[bot]') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: save the pr information | |
| env: | |
| COMMENT_BODY: ${{ github.event.comment.body }} | |
| REVIEW_BODY: ${{ github.event.review.body }} | |
| USER_LOGIN: ${{ github.event.sender.login }} | |
| run: | | |
| jq -n \ | |
| --arg pr_num "${{ github.event.pull_request.number || github.event.issue.number }}" \ | |
| --arg event_action "${{ github.event.action }}" \ | |
| --arg review_state "${{ github.event.review.state }}" \ | |
| --arg event_name "${{ github.event_name }}" \ | |
| --arg comment_body "$COMMENT_BODY" \ | |
| --arg review_comment_body "$REVIEW_BODY" \ | |
| --arg user_login "$USER_LOGIN" \ | |
| --arg action "add-remove-labels" \ | |
| '{ | |
| pr_num: $pr_num, | |
| event_action: $event_action, | |
| review_state: $review_state, | |
| event_name: $event_name, | |
| comment_body: $comment_body, | |
| review_comment_body: $review_comment_body, | |
| user_login: $user_login, | |
| action: $action | |
| }' >> context.json | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: context.json | |
| path: ./ |