-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[6.13.z] Bump pascalgn/automerge-action from 0.15.6 to 0.16.2 (#1185)
* fixed the diff between gha robottelo and airgun (#949) (cherry picked from commit 15b50fb) * fixing the auto-merge PR's in Airgun (#1113) (cherry picked from commit a426b7e) * Bump pascalgn/automerge-action from 0.15.6 to 0.16.2 Bumps [pascalgn/automerge-action](https://github.com/pascalgn/automerge-action) from 0.15.6 to 0.16.2. - [Release notes](https://github.com/pascalgn/automerge-action/releases) - [Commits](pascalgn/automerge-action@v0.15.6...v0.16.2) --- updated-dependencies: - dependency-name: pascalgn/automerge-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> (cherry picked from commit 318a029) --------- Co-authored-by: Omkar Khatavkar <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
273a64c
commit d2c7cea
Showing
2 changed files
with
18 additions
and
56 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,6 @@ on: | |
- ready_for_review | ||
branches-ignore: | ||
- master | ||
pull_request_review: | ||
types: | ||
- submitted | ||
branches-ignore: | ||
- master | ||
check_suite: | ||
types: | ||
- completed | ||
|
@@ -45,73 +40,40 @@ jobs: | |
- name: Wait for other status checks to Pass | ||
id: waitforstatuschecks | ||
uses: lewagon/wait-on-check-action@v1.2.0 | ||
uses: lewagon/wait-on-check-action@v1.3.3 | ||
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: is PRT check Passed ? | ||
run: | | ||
api_endpoint="https://api.github.com/repos/${{github.repository}}/statuses/${{ github.head_ref }}" | ||
function get_status() { | ||
curl -s "$api_endpoint" | jq '[.[] | .state] | .[0]' | ||
} | ||
function get_context() { | ||
curl -s "$api_endpoint" | jq '[.[] | .context] | .[0]' | ||
} | ||
statuses_length=$(curl -s $api_endpoint | jq 'length') | ||
if [ $statuses_length -eq 0 ]; then | ||
echo "PRT failed to start ! Stopping." | ||
exit 1 | ||
fi | ||
status=$(get_status) | ||
context=$(get_context) | ||
if [ "$context" != "Robottelo-Runner" ]; then | ||
echo "::error Failed to get Robottelo-Runner status" | ||
exit 1 | ||
fi | ||
counter=0 | ||
echo "Waiting for PRT to complete....." | ||
while [ "$status" != "success" ] && [ "$status" != "failure" ]; do | ||
if [ $counter -gt 20 ]; then | ||
echo "PRT Timeout" | ||
exit 1 | ||
fi | ||
sleep 300 | ||
status=$(get_status) | ||
echo "Robottelo-Runner : $status" | ||
counter=$((counter+1)) | ||
done | ||
- 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 | ||
|
||
if [ "$status" == "success" ]; then | ||
echo "PRT Passed Successfully!" | ||
- name: Check the PRT status | ||
run: | | ||
if [ ${{ steps.outcome.outputs.result }} == 'success' ]; then | ||
echo "Status check passed!" | ||
else | ||
echo "Robottelo-Runner : $status" | ||
echo "::error PRT failed" | ||
exit 1 | ||
echo "Status check failed!" | ||
fi | ||
- id: automerge | ||
name: Auto merge of cherry-picked PRs. | ||
uses: "pascalgn/[email protected]" | ||
if: steps.waitforstatuschecks.outputs.status == 'success' | ||
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 | ||
BASE_BRANCHES: "master" # avoid automerge branch | ||
|
||
- name: Auto Merge Status | ||
run: | | ||
|