Skip to content

Commit

Permalink
fix(workflow): fix create-crd-update-pr-in-longhorn-repo.yml
Browse files Browse the repository at this point in the history
- Use CUSTOM_GITHUB_ACTION_TOKEN that has permissions to create PR in
  longhorn/longhorn.
- Fix committer for passing DOC check.
- Create PR after opening, editing or synchronizing the longhorn-manager
  PR.

Longhorn 10193

Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit committed Jan 23, 2025
1 parent ca32967 commit 476ea8e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/create-crd-update-pr-in-longhorn-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ name: Create CRD Update PR in Longhorn Repo
on:
pull_request:
types:
- closed
- opened
- edited
- synchronize

jobs:
if_merged:
if: github.event.pull_request.merged == true
create-pr:
runs-on: ubuntu-latest
steps:
- name: Prepare Packages
Expand Down Expand Up @@ -39,13 +40,13 @@ jobs:
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
token: ${{ secrets.CUSTOM_GITHUB_ACTION_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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
committer: Longhorn GitHub Bot <67932897+longhorn-io-github-bot@users.noreply.github.com>
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: |
Expand Down

0 comments on commit 476ea8e

Please sign in to comment.