-
Notifications
You must be signed in to change notification settings - Fork 153
55 lines (50 loc) · 2.06 KB
/
create-crd-update-pr-in-longhorn-repo.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Create CRD and Manifest Update PR in Longhorn Repo
on:
pull_request_target:
types: [closed]
branches:
- master
- "v*"
jobs:
create-pull-request:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Prepare Packages
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- name: Log triggering PR information
shell: bash
run: |
echo "Triggered by PR: #${{ github.event.pull_request.number }}"
echo "PR Title: ${{ github.event.pull_request.title }}"
echo "PR URL: ${{ github.event.pull_request.html_url }}"
echo "PR was merged into branch: ${{ github.event.pull_request.base.ref }}"
- uses: actions/checkout@v4
with:
repository: longhorn/longhorn
ref: ${{ github.event.pull_request.base.ref }}
- name: Update crds.yaml and manifests
shell: bash
run: |
curl -L https://github.com/longhorn/longhorn-manager/raw/master/k8s/crds.yaml -o chart/templates/crds.yaml
bash scripts/generate-longhorn-yaml.sh
bash scripts/helm-docs.sh
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
branch: "update-crds-and-manifests-longhorn-manager-${{ github.event.pull_request.number }}"
delete-branch: true
sign-commits: true
signoff: true
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
committer: Longhorn GitHub Bot <[email protected]>
commit-message: "chore(crd): update crds.yaml and manifests"
title: "chore(crd): update crds.yaml and manifests (PR longhorn/longhorn-manager#${{ github.event.pull_request.number}})"
body: |
This PR updates the crds.yaml and manifests.
It was triggered by longhorn/longhorn-manager#${{ github.event.pull_request.number}}.