Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
ggwpez committed Jun 14, 2024
1 parent f788e35 commit 9e00f83
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 47 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/release-backport-yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/release-backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Backport

on:
issue_comment:
types: [created]
workflow_dispatch:

jobs:
bench:
if: |
github.event.issue.pull_request != null &&
contains(github.event.comment.body, '/backport')
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: ACK Comment
run: |
gh api -X POST /repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --input - <<EOF
{
"content": "rocket"
}
EOF
- name: Check Branch
if: github.event.issue.pull_request.base.ref != 'master'
run: |
gh issue comment ${{ github.event.issue.number }} --body "🤖 Backport: error: can only backport Pull Requests that target branch 'master'"
exit 1
- name: Comment
run: |
COMMENT_ID=$(gh issue comment ${{ github.event.issue.number }} --json id --jq '.id' --body \
"🤖 Backport: starting CI process, you can cancel it [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})")
echo "COMMENT_ID=$COMMENT_ID" >> $GITHUB_ENV

0 comments on commit 9e00f83

Please sign in to comment.