forked from opendatahub-io/opendatahub-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.49 KB
/
sync_dashboard_crds.yaml
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
# Opens a PR in the opendatahub-operator repo when crds are updated in the dashboard repo
name: Sync Dashboard CRDs
# Await dispatch from dashboard repo that crds have been modified
on:
workflow_dispatch:
inputs:
dashboard_label:
description: "Label from odh-dashboard to sync CRD from"
source_branch:
default: "master"
description: "branch of opendatahub-operator to checkout from"
jobs:
dashboard-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout operator source code on master branch
uses: actions/checkout@v3
with:
fetch-depth: '1'
ref: ${{ github.event.inputs.source_branch }}
- name: Gather files
shell: bash
run: |
cd ${{ github.workspace }}/config/crd/dashboard-crds
svn export --force "https://github.com/opendatahub-io/odh-dashboard/tags/${{ github.event.inputs.dashboard_label }}/manifests/crd" .
rm kustomization.yaml
sed -i "s# Red Hat##g" *odh*.yaml
sed -i "s#OpenShift Data Science#Open Data Hub#g" *odh*.yaml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4.2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Automated Change by GitHub Action
delete-branch: true
title: Sync operator CRDs from odh-dashboard manifests CRDs
body: This is an automated pull request to sync the operator crds with dashboard crds.
signoff: true