Skip to content

Commit

Permalink
chore: sync to ks-console (#5154)
Browse files Browse the repository at this point in the history
* ci: add workflow_dispatch trigger to main.yaml (kubesphere#4295)

Signed-off-by: donniean <[email protected]>
(cherry picked from commit 16b5d5a)

* ci: add .github/workflows/sync-to-kse.yml (kubesphere#4294)

* ci: add .github/workflows/sync-to-kse.yml

Signed-off-by: donniean <[email protected]>

* ci: update runs-on to ubuntu-latest in sync-to-kse.yml

Signed-off-by: donniean <[email protected]>

* ci: add ssh to sync-to-kse.yml

Signed-off-by: donniean <[email protected]>

---------

Signed-off-by: donniean <[email protected]>
(cherry picked from commit e12a468)

* fix: set initial value of isRemoteExtensionLoading to true (kubesphere#4296)

Signed-off-by: donniean <[email protected]>
(cherry picked from commit a96de0a)

* ci: update .github/workflows/sync-to-kse.yml (kubesphere#4297)

Signed-off-by: donniean <[email protected]>
(cherry picked from commit 14377d8)

* ci: fix TARGET_BRANCH in .github/workflows/sync-to-kse.yml (kubesphere#4298)

Signed-off-by: donniean <[email protected]>
(cherry picked from commit edc6058)

* chore: sync to ks-console

Signed-off-by: donniean <[email protected]>

* Revert "chore: sync to ks-console"

This reverts commit 314b13b65c4d0f68f896e380374ae0b68b32adb2.

---------

Signed-off-by: donniean <[email protected]>
  • Loading branch information
donniean authored Sep 18, 2024
1 parent 59260be commit f15d3d5
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
# - dev
- release-*
- master
# - dev
- release-*
workflow_dispatch:

env:
# TODO: Change variable to your image's name.
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/sync-to-kse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Sync to kse-console

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

env:
# SOURCE_OWNER: kubesphere
SOURCE_REPO_NAME: console
SOURCE_BRANCH: master

TARGET_OWNER: kubesphere
TARGET_REPO_NAME: kse-console
TARGET_BRANCH: ksc-release-4.1

jobs:
sync-to-kse:
runs-on: ubuntu-latest

steps:
- name: Get current date
id: date
run: |
echo "NOW=$(TZ='Asia/Shanghai' date '+%Y%m%d-%H%M%S')" >> $GITHUB_ENV
echo "DISPLAY_NOW=$(TZ='Asia/Shanghai' date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
- name: Setup SSH
uses: MrSquaare/ssh-setup-action@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Checkout Source
uses: actions/checkout@v4

- name: Checkout Target
run: |
git remote add kse-console [email protected]:${{ env.TARGET_OWNER }}/${{ env.TARGET_REPO_NAME }}.git
git fetch ${{ env.TARGET_REPO_NAME }} ${{ env.TARGET_BRANCH }}
git checkout ${{ env.TARGET_BRANCH }}
- name: Cherry-pick the latest commit
run: |
git cherry-pick ${{ github.sha }}
- name: Create Pull Request
env:
COMMIT_MESSAGE: 'chore(bot): sync commit ${{ github.sha }} from ${{ env.SOURCE_REPO_NAME }}:${{ env.SOURCE_BRANCH }} to ${{ env.TARGET_REPO_NAME }}:${{ env.TARGET_BRANCH }} at ${{ env.DISPLAY_NOW }}'
uses: peter-evans/create-pull-request@v7
with:
commit-message: ${{ env.COMMIT_MESSAGE }}
signoff: true
branch: ${{ env.TARGET_BRANCH }}-${{ github.sha }}
delete-branch: true
branch-suffix: timestamp
sign-commits: true
title: ${{ env.COMMIT_MESSAGE }}
body: |
```release-note
none
```
labels: approved
reviewers: ${{ github.event.head_commit.committer }}
2 changes: 1 addition & 1 deletion packages/core/src/Pages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const baseRoutes: RouteObject[] = [
const homePage = globals.config.homePage || '/dashboard';

function usePages() {
const [isRemoteExtensionLoading, setIsRemoteExtensionLoading] = useState(false);
const [isRemoteExtensionLoading, setIsRemoteExtensionLoading] = useState(true);

useEffect(() => {
setIsRemoteExtensionLoading(true);
Expand Down

0 comments on commit f15d3d5

Please sign in to comment.