operator sn-operator (0.7.0-rc.37) #9196
This file contains 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
on: issue_comment | |
name: Issue Comments - retest | |
env: | |
OPP_PRODUCTION_TYPE: "k8s" | |
jobs: | |
handle_comments: | |
name: Check comments for /retest | |
if: | | |
startsWith(github.event.comment.body, '/retest') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Restest command handler | |
id: command | |
uses: xt0rted/slash-command-action@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
command: retest | |
reaction: "true" | |
reaction-type: "eyes" | |
allow-edits: "true" | |
permission-level: read | |
- name: Doing hold | |
uses: actions/github-script@v6 | |
if: | | |
steps.command.outputs.command-name == 'retest' | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '/hold' | |
}) | |
- name: Sleep for 10 seconds | |
uses: jakejarvis/wait-action@master | |
with: | |
time: '10s' | |
- name: Doing hold cancel | |
uses: actions/github-script@v6 | |
if: | | |
steps.command.outputs.command-name == 'retest' | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '/hold cancel' | |
}) |