-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,18 @@ jobs: | |
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
# Step 3: Create a new branch | ||
- name: Create new branch for version update | ||
# Step 4: Add a remote pointing to the forked repository | ||
- name: Add fork remote | ||
run: | | ||
TAG_VERSION=${GITHUB_REF#refs/tags/} | ||
BRANCH_NAME="update-version-${TAG_VERSION}" | ||
git checkout -b $BRANCH_NAME | ||
git remote add fork https://github.com/openimsdk/actions-test.git | ||
git fetch fork | ||
# # Step 3: Create a new branch | ||
# - name: Create new branch for version update | ||
# run: | | ||
# TAG_VERSION=${GITHUB_REF#refs/tags/} | ||
# BRANCH_NAME="update-version-${TAG_VERSION}" | ||
# git checkout -b $BRANCH_NAME | ||
|
||
# Step 4: Update version file | ||
- name: Update version file | ||
|
@@ -36,17 +42,21 @@ jobs: | |
# Step 5: Push the new branch | ||
- name: Push branch | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
TAG_VERSION=${GITHUB_REF#refs/tags/} | ||
BRANCH_NAME="update-version-${TAG_VERSION}" | ||
git push origin $BRANCH_NAME | ||
git push fork $BRANCH_NAME | ||
# Step 6: Create Pull Request | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
id: create_pr | ||
uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: $BRANCH_NAME | ||
# repository: openimsdk/actions-test | ||
branch: github-actions[bot]:$BRANCH_NAME | ||
base: main # Replace 'main' with your default branch if necessary | ||
title: "Update version to $TAG_VERSION" | ||
body: "This PR updates the version file to the new tag version $TAG_VERSION." | ||
base: main # Replace 'main' with your default branch if necessary |