Skip to content

Commit 071bec8

Browse files
authored
Close PR in RedHat Operator repo as NGINX Bot (#233)
1 parent 67477c5 commit 071bec8

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Close Operator PR
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
url:
7+
description: "Operator PR URL to close"
8+
required: true
9+
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
pr-update:
16+
runs-on: ubuntu-22.04
17+
steps:
18+
- name: Close PR
19+
run: |
20+
gh pr view ${{ inputs.url }}
21+
rc=$?
22+
if [ ${rc} -eq 0 ]; then
23+
echo "Closing PR ${{ inputs.url }}"
24+
gh pr close ${{ inputs.url }}
25+
echo $?
26+
else
27+
echo "${{ inputs.url }} does not exist"
28+
fi
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.NGINX_PAT }}

0 commit comments

Comments
 (0)