From 520fbdfd9160a46e279deaff3f9270f8f18c0cc8 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 17:00:16 +0900 Subject: [PATCH 01/17] ci: add trigger nightly --- .github/workflows/trigger-nightly.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/trigger-nightly.yml diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml new file mode 100644 index 000000000..195181788 --- /dev/null +++ b/.github/workflows/trigger-nightly.yml @@ -0,0 +1,20 @@ +name: trigger-nightly +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: +jobs: + update-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: gh pr checkout canary + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add . + NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') + git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" + git push From be7e7c69cd752c15efa5ec8c7b2ce45cc87d9a1c Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 17:21:44 +0900 Subject: [PATCH 02/17] chore: cleanup --- .github/workflows/trigger-nightly.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 195181788..ca5ff55d9 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -14,7 +14,6 @@ jobs: - run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add . NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" git push From 158d6442d8bd8fabc35d7a874811df7fc625edcd Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 17:30:23 +0900 Subject: [PATCH 03/17] ci: test push --- .github/workflows/trigger-nightly.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index ca5ff55d9..78f34569c 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -1,8 +1,9 @@ name: trigger-nightly on: - schedule: - - cron: '0 0 * * *' - workflow_dispatch: + # schedule: + # - cron: '0 0 * * *' + # workflow_dispatch: + push: jobs: update-pr: runs-on: ubuntu-latest From 9e7272ca64a1513c3ec1819bacf9b8b203e6d8af Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 17:47:53 +0900 Subject: [PATCH 04/17] ci: tweak permissions --- .github/workflows/trigger-nightly.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 78f34569c..f705c607d 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -4,6 +4,12 @@ on: # - cron: '0 0 * * *' # workflow_dispatch: push: + +permissions: + contents: write + # pull-requests: write + # repository-projects: write + jobs: update-pr: runs-on: ubuntu-latest From 763428a12fb1f704e0f7cbceb2c4dda1e4d10934 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:12:59 +0900 Subject: [PATCH 05/17] ci: use PAT --- .github/workflows/trigger-nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index f705c607d..434747c5a 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -11,7 +11,7 @@ permissions: # repository-projects: write jobs: - update-pr: + trigger-nightly: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -23,4 +23,4 @@ jobs: git config --local user.name "GitHub Action" NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" - git push + git push https://x-access-token:${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }}@github.com/${{ github.repository }}.git From 907728df03b54d3d9dd06483f43c47c7ff1b0551 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:15:12 +0900 Subject: [PATCH 06/17] ci: tweak --- .github/workflows/trigger-nightly.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 434747c5a..304f805a9 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -17,10 +17,10 @@ jobs: - uses: actions/checkout@v4 - run: gh pr checkout canary env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" git push https://x-access-token:${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }}@github.com/${{ github.repository }}.git From ed11ac6ce0a86f245e7674e57bcf4ba9a247b2bf Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:16:08 +0900 Subject: [PATCH 07/17] ci: tweak --- .github/workflows/trigger-nightly.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 304f805a9..83e49dc7c 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -18,9 +18,10 @@ jobs: - run: gh pr checkout canary env: GITHUB_TOKEN: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - - run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" + - name: push commit + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" git push https://x-access-token:${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }}@github.com/${{ github.repository }}.git From 225aec1938dcb5066e1a06bb6f232f2b187b431c Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:17:41 +0900 Subject: [PATCH 08/17] ci: use oauth2 --- .github/workflows/trigger-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 83e49dc7c..dda0e513d 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -24,4 +24,4 @@ jobs: git config --local user.name "GitHub Action" NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" - git push https://x-access-token:${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }}@github.com/${{ github.repository }}.git + git push https://oauth2:${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }}@github.com/${{ github.repository }}.git From d2fa26d0f2bcd2d7ccfb5b76add0df6b296439e1 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:23:52 +0900 Subject: [PATCH 09/17] ci: tweak --- .github/workflows/trigger-nightly.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index dda0e513d..22945a7dc 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -15,13 +15,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + token: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - run: gh pr checkout canary env: GITHUB_TOKEN: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - name: push commit run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" + # git config --local user.email "action@github.com" + # git config --local user.name "GitHub Action" NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" git push https://oauth2:${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }}@github.com/${{ github.repository }}.git From 141767f56ecece20a5652f7887924be8f4c34f96 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:24:35 +0900 Subject: [PATCH 10/17] ci: tweak --- .github/workflows/trigger-nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 22945a7dc..ffc0a0f96 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -22,8 +22,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - name: push commit run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" git push https://oauth2:${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }}@github.com/${{ github.repository }}.git From 998e65b2d3f59b778faf32332afc28c4666862b1 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:26:28 +0900 Subject: [PATCH 11/17] ci: tweak --- .github/workflows/trigger-nightly.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index ffc0a0f96..a9df1c2f1 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -18,12 +18,10 @@ jobs: with: token: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - run: gh pr checkout canary - env: - GITHUB_TOKEN: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - name: push commit run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" - git push https://oauth2:${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }}@github.com/${{ github.repository }}.git + git push From 06cb07609ad4ec335facc169780defdc9ffac0bb Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:28:32 +0900 Subject: [PATCH 12/17] ci: tweak --- .github/workflows/trigger-nightly.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index a9df1c2f1..be82da957 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -18,6 +18,8 @@ jobs: with: token: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - run: gh pr checkout canary + env: + GITHUB_TOKEN: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - name: push commit run: | git config --local user.email "action@github.com" From 35dce3b0c2402c14e5e1e5c17c9e48fc462544d3 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:32:04 +0900 Subject: [PATCH 13/17] ci: tweak --- .github/workflows/trigger-nightly.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index be82da957..1150c6e0d 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -5,10 +5,10 @@ on: # workflow_dispatch: push: -permissions: - contents: write - # pull-requests: write - # repository-projects: write +# permissions: +# contents: write +# pull-requests: write +# repository-projects: write jobs: trigger-nightly: From 192ad29333f609dcc184df8c5652b1a812d2cc88 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:33:47 +0900 Subject: [PATCH 14/17] ci: tweak --- .github/workflows/trigger-nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 1150c6e0d..407bc5874 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -22,8 +22,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - name: push commit run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" git push From 4d4c5fd9f719698355de176e89e55bd02cf0e839 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:36:30 +0900 Subject: [PATCH 15/17] ci: tweak --- .github/workflows/trigger-nightly.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 407bc5874..d24457154 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -16,10 +16,8 @@ jobs: steps: - uses: actions/checkout@v4 with: + ref: canary token: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - - run: gh pr checkout canary - env: - GITHUB_TOKEN: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - name: push commit run: | git config user.name "github-actions[bot]" @@ -27,3 +25,19 @@ jobs: NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" git push + + trigger-nightly-plugin-rsc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: hi-ogawa/vite-plugin-react + ref: feat-rsc + token: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} + # - name: push commit + # run: | + # git config user.name "github-actions[bot]" + # git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + # NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') + # git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" + # git push From 472297710f51a63cc925765541296a6b60c68212 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Fri, 4 Jul 2025 18:39:48 +0900 Subject: [PATCH 16/17] ci: push --- .github/workflows/trigger-nightly.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index d24457154..7122dd869 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -32,12 +32,12 @@ jobs: - uses: actions/checkout@v4 with: repository: hi-ogawa/vite-plugin-react - ref: feat-rsc + ref: chore-rsc-nightly token: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - # - name: push commit - # run: | - # git config user.name "github-actions[bot]" - # git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - # NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') - # git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" - # git push + - name: push commit + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') + git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" + git push From 4b5152a3a554676c507db1161588c970a724f945 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Sat, 5 Jul 2025 08:57:47 +0900 Subject: [PATCH 17/17] ci: cleanup --- .github/workflows/trigger-nightly.yml | 32 +++++++-------------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/.github/workflows/trigger-nightly.yml b/.github/workflows/trigger-nightly.yml index 7122dd869..2606f7dd5 100644 --- a/.github/workflows/trigger-nightly.yml +++ b/.github/workflows/trigger-nightly.yml @@ -1,32 +1,16 @@ +# workflow to push an empty commit and trigger pkg.pr.new on @vitejs/plugin-rsc PR +# https://github.com/vitejs/vite-plugin-react/pull/524 +# cf. React nightly workflow +# https://github.com/facebook/react/blob/5d87cd224452c68d09bef99656b6261e9772a210/.github/workflows/runtime_prereleases_nightly.yml#L12 + name: trigger-nightly on: - # schedule: - # - cron: '0 0 * * *' - # workflow_dispatch: - push: - -# permissions: -# contents: write -# pull-requests: write -# repository-projects: write + schedule: + - cron: '0 0 * * *' + workflow_dispatch: jobs: trigger-nightly: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: canary - token: ${{ secrets.REACT_NIGHTLY_TRIGGER_TOKEN }} - - name: push commit - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - NIGHTLY_VERSION=$(npm view react dist-tags.canary --json | jq -r 'split("-") | .[-2:] | join("-")') - git commit --allow-empty -m "chore: nightly ${NIGHTLY_VERSION}" - git push - - trigger-nightly-plugin-rsc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4