Skip to content

Commit

Permalink
Attempting to fix the skipped actions due to push event (#9803)
Browse files Browse the repository at this point in the history
  • Loading branch information
jyejare authored Jul 20, 2022
1 parent ddf4f05 commit 0737cc7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/auto_cherry_pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
name: auto_cherry_pick_commits

on:
push
pull_request:
types:
- closed

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
branch-matrix:
if: contains(github.event.pull_request.labels.*.name, 'CherryPick')
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'CherryPick')
name: Generate a branch matrix to apply cherrypicks
runs-on: ubuntu-latest
outputs:
Expand All @@ -21,7 +23,7 @@ jobs:
- id: set-matrix
run: echo "::set-output name=branches::$(git branch -rl --sort=-authordate 'origin/6.*.z' --format='%(refname:lstrip=-1)' | head -n2 | jq -cnR '[inputs | select(length>0)]')"
auto_cherry_picking:
if: contains(github.event.pull_request.labels.*.name, 'CherryPick')
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'CherryPick')
name: Auto Cherry picking to branches
needs: branch-matrix
runs-on: ubuntu-latest
Expand Down

0 comments on commit 0737cc7

Please sign in to comment.