Skip to content

remove accidentally cherry-picked file #2803

remove accidentally cherry-picked file

remove accidentally cherry-picked file #2803

name: automerge auto-cherry-picked pr's
on:
pull_request_target:
types:
- labeled
- unlabeled
- edited
- ready_for_review
branches-ignore:
- master
check_suite:
types:
- completed
branches-ignore:
- master
jobs:
automerge:
name: Automerge auto-cherry-picked pr
if: contains(github.event.pull_request.labels.*.name, 'AutoMerge_Cherry_Picked') && contains(github.event.pull_request.labels.*.name, 'Auto_Cherry_Picked')
runs-on: ubuntu-latest
steps:
- id: find-prt-comment
name: Find the prt comment
uses: peter-evans/find-comment@v2
with:
issue-number: ${{ github.event.number }}
body-includes: "trigger: test-robottelo"
direction: last
- name: Fail automerge if PRT was not initiated
if: steps.find-prt-comment.outputs.comment-body == ''
run: |
echo "::error PRT comment not added the PR"
- name: Wait for PRT checks to get initiated
run: |
echo "Waiting for ~ 10 mins, PRT to be initiated." && sleep 600
- name: Wait for other status checks to Pass
id: waitforstatuschecks
uses: lewagon/[email protected]
with:
ref: ${{ github.head_ref }}
repo-token: ${{ secrets.CHERRYPICK_PAT }}
wait-interval: 60
running-workflow-name: 'Automerge auto-cherry-picked pr'
allowed-conclusions: success,skipped
- name: Fetch the PRT status
id: outcome
uses: omkarkhatavkar/wait-for-status-checks@main
with:
ref: ${{ github.head_ref }}
context: 'Robottelo-Runner'
wait-interval: 60
count: 100
- name: Check the PRT status
run: |
if [ ${{ steps.outcome.outputs.result }} == 'success' ]; then
echo "Status check passed!"
else
echo "Status check failed!"
fi
- id: automerge
name: Auto merge of cherry-picked PRs.
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.CHERRYPICK_PAT }}"
MERGE_LABELS: "AutoMerge_Cherry_Picked, Auto_Cherry_Picked"
MERGE_METHOD: "squash"
MERGE_RETRIES: 5
MERGE_RETRY_SLEEP: 900000
- name: Auto Merge Status
run: |
if [ "${{ steps.automerge.outputs.mergeResult }}" == 'merged' ]; then
echo "Pull request ${{ steps.automerge.outputs.pullRequestNumber }} is Auto Merged !"
else
echo "::error Auto Merge for Pull request failed !"
exit 1
fi