Add rancher config #2946
Workflow file for this run
This file contains hidden or 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
# SPDX-FileCopyrightText: 2025 Intel Corporation | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Auto Approve & Merge | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
permissions: {} | |
jobs: | |
auto-approve: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Auto approve PR | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: github.actor == github.actor == 'sys-orch' && | |
github.event.pull_request.base.ref == 'main-pass-validation' | |
run: | | |
echo "Approving PR #${{ github.event.pull_request.number }} by ${{ github.actor }}" | |
gh pr review ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --approve --body "Auto approved by sys-orch-github-approve bot" | |
auto-merge: | |
permissions: | |
pull-requests: write | |
contents: write | |
name: Auto merge PR | |
needs: | |
- auto-approve | |
runs-on: ubuntu-latest | |
if: | | |
github.actor == 'sys-orch' && | |
github.event.pull_request.base.ref == 'main-pass-validation' | |
steps: | |
- name: Auto merge | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "Enabling auto-merge for PR #${{ github.event.pull_request.number }} by ${{ github.actor }}" | |
gh pr merge ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --auto --squash | |