Rebase Bot #91589
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
name: Rebase Bot | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
rebase: | |
name: Build Manifests and Rebase | |
if: (github.event.issue.pull_request != '') && (contains(github.event.comment.body, '/rebase')) && (github.repository == 'kubevirt/hyperconverged-cluster-operator') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the latest code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.HCO_BOT_TOKEN }} | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Rebase and rebuild manifests | |
id: rebase_rebuild | |
continue-on-error: true | |
run: ./automation/rebase-bot/rebase-bot.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.HCO_BOT_TOKEN }} | |
- name: Check if rebase action has failed and comment | |
if: steps.rebase_rebuild.outcome != 'success' | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{secrets.HCO_BOT_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: "Rebase Bot action has failed.\nAction URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
}) |