forked from kubevirt/hyperconverged-cluster-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.35 KB
/
rebase-bot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 }}"
})