update action #6
Workflow file for this run
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
name: Auto PR from develop branch to a feature branch | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- develop | |
env: | |
TARGET_BRANCH: feature/ashrae-9012022 #define the target branch when in parallel developing a feature | |
jobs: | |
create-pr: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Ensure Develop Branch is Up-to-Date | |
run: | | |
git fetch origin | |
git checkout develop | |
git pull origin develop | |
- name: Create Pull Request to Feature Branch | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.AUTO_PAT }} | |
commit-message: "Auto PR: Sync develop -> ${{ env.TARGET_BRANCH }}" | |
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
base: ${{ env.TARGET_BRANCH }} | |
branch: update/develop-to-${{ env.TARGET_BRANCH }} | |
delete-branch: true | |
title: "Auto PR: Sync develop -> ${{ env.TARGET_BRANCH }}" | |
body: "This PR is automatically created to sync the latest changes from develop branch" | |
labels: automated | |
assignees: weilixu | |
reviewers: weilixu | |
draft: false |