Skip to content

Commit 9dcf8bd

Browse files
committed
chore: update stable sync
To accept as input the semver from the repo
1 parent 70f94aa commit 9dcf8bd

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

.github/workflows/stable-sync.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Stable Sync
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
semver-version:
7+
required: true
8+
type: string
9+
description: 'The semantic version to use for the sync (e.g., x.x.x)'
510

611
jobs:
712
stable-sync:
@@ -24,33 +29,33 @@ jobs:
2429
const { data: prs } = await github.rest.pulls.list({
2530
owner: context.repo.owner,
2631
repo: context.repo.repo,
27-
head: `${context.repo.owner}:stable-main-${process.env.NEXT_VERSION}`,
32+
head: `${context.repo.owner}:stable-main-${process.env.SEMVER_VERSION}`,
2833
base: 'main'
2934
});
3035
return prs.length > 0;
3136
env:
32-
NEXT_VERSION: ${{ steps.version.outputs.next_version }}
37+
SEMVER_VERSION: ${{ inputs.semver-version }}
3338

3439
- name: Run stable sync
3540
# if: steps.check-pr.outputs.result != 'true'
36-
run: node .github/scripts/stable-sync.js "stable-main-${{ steps.version.outputs.next_version }}"
41+
run: node .github/scripts/stable-sync.js "stable-main-${{ inputs.semver-version }}"
3742

3843
- name: Create Pull Request
3944
if: steps.check-pr.outputs.result != 'true'
40-
uses: peter-evans/create-pull-request@v5
45+
uses: peter-evans/create-pull-request@v7
4146
with:
4247
token: ${{ secrets.GITHUB_TOKEN }}
43-
commit-message: "chore: sync stable to main for version ${{ steps.version.outputs.next_version }}"
44-
title: "chore: sync stable to main for version ${{ steps.version.outputs.next_version }}"
48+
author: "metamaskbot metamaskbot@users.noreply.github.com"
49+
commit-message: "chore: sync stable branch with main for version ${{ inputs.semver-version }}"
50+
title: "chore: sync stable branch with main for version ${{ inputs.semver-version }}"
4551
body: |
46-
This PR syncs the stable branch to main for version ${{ steps.version.outputs.next_version }}.
52+
This PR syncs the stable branch from main prior of version ${{ inputs.semver-version }}.
4753
4854
Changes:
49-
- Merged stable into main
50-
- Preserved stable-specific files
51-
- Updated version to ${{ steps.version.outputs.next_version }}
52-
branch: "stable-main-${{ steps.version.outputs.next_version }}"
53-
base: main
55+
- Merged main into stable-main-${{ inputs.semver-version }}
56+
- Preserved stable-specific files from main
57+
- Updated version to ${{ inputs.semver-version }}
58+
branch: "stable-main-${{ inputs.semver-version }}"
5459
labels: |
5560
sync
5661
stable

0 commit comments

Comments
 (0)