Skip to content

Commit

Permalink
[bot] update konflux configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
openshift-pipelines-bot committed Oct 17, 2024
1 parent 7409b33 commit 8c4f3a8
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/auto-merge.main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: auto-merge-main

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/main" --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-main
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-main" --json "number" | jq ".[].number"); do
gh pr merge --rebase --delete-branch --auto $p
done
env:
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}

0 comments on commit 8c4f3a8

Please sign in to comment.