-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
making same as other z-stream branches
- Loading branch information
1 parent
7a5e132
commit 3f0a4e9
Showing
1 changed file
with
20 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,32 @@ | ||
name: Dependabot Auto Merge | ||
on: pull_request | ||
|
||
permissions: | ||
pull-requests: write | ||
name: Dependabot Auto Merge - ZStream | ||
on: | ||
pull_request_target: | ||
branches-ignore: | ||
- master | ||
|
||
jobs: | ||
dependabot: | ||
name: dependabot-auto-merge | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.user.login == 'dependabot[bot]' | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
if: | | ||
contains(github.event.pull_request.labels.*.name, 'dependencies') | ||
- name: Find the tests for the dependency requirement | ||
id: yaml | ||
uses: mikefarah/yq@master | ||
steps: | ||
- id: find-prt-comment | ||
name: Find the prt comment | ||
uses: peter-evans/find-comment@v2 | ||
with: | ||
cmd: yq e '.["${{ steps.metadata.outputs.dependency-names }}"]' ./.github/dependency_tests.yaml | ||
issue-number: ${{ github.event.number }} | ||
body-includes: "trigger: test-robottelo" | ||
direction: last | ||
|
||
- name: Add the PRT Comment | ||
if: steps.yaml.outputs.result != 'null' | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
trigger: test-robottelo\r | ||
pytest: ${{ steps.yaml.outputs.result }} | ||
- name: Wait for PRT checks to get initiated | ||
if: steps.yaml.outputs.result != 'null' | ||
if: steps.find-prt-comment.outputs.comment-body != '' | ||
run: | | ||
echo "Waiting for ~ 10 mins, PRT to be initiated." && sleep 600 | ||
- name: Fetch and Verify the PRT status | ||
if: steps.yaml.outputs.result != 'null' | ||
if: steps.find-prt-comment.outputs.comment-body != '' | ||
id: outcome | ||
uses: omkarkhatavkar/wait-for-status-checks@main | ||
with: | ||
|
@@ -51,10 +37,10 @@ jobs: | |
|
||
- name: Wait for other status checks to Pass | ||
id: waitforstatuschecks | ||
uses: lewagon/[email protected].3 | ||
uses: lewagon/[email protected].1 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
repo-token: ${{ secrets.CHERRYPICK_PAT }} | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 60 | ||
running-workflow-name: 'dependabot-auto-merge' | ||
allowed-conclusions: success,skipped | ||
|
@@ -63,7 +49,7 @@ jobs: | |
name: Auto merge of dependabot PRs. | ||
uses: "pascalgn/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.CHERRYPICK_PAT }}" | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
MERGE_LABELS: "dependencies" | ||
MERGE_METHOD: "squash" | ||
MERGE_RETRIES: 5 | ||
|