Skip to content

auto-merge-release-v1.17.x #1297

auto-merge-release-v1.17.x

auto-merge-release-v1.17.x #1297

name: auto-merge-release-v1.17.x
on:
workflow_dispatch: {}
schedule:
- cron: "*/30 * * * *" # At every 30 minutes
jobs:
auto-approve:
runs-on: ubuntu-latest
if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere
permissions:
pull-requests: write
steps:
- name: Checkout the current repo
uses: actions/checkout@v4
- name: auto-merge-update-references
run: |
gh auth status
git config user.name openshift-pipelines-bot
git config user.email [email protected]
# Approve and merge pull-request with no reviews
for p in $(gh pr list --search "author:app/red-hat-konflux head:konflux/references/release-v1.17.x" --json "number" | jq ".[].number"); do
gh pr merge --rebase --delete-branch --auto $p
done
env:
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}
- name: auto-merge-upstream-release-v1.17.x
run: |
gh auth status
git config user.name openshift-pipelines-bot
git config user.email [email protected]
# Approve and merge pull-request with no reviews
for p in $(gh pr list --search "head:actions/update/sources-release-v1.17.x" --json "number" | jq ".[].number"); do
gh pr merge --rebase --delete-branch --auto $p
done
env:
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}