File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -17,30 +17,25 @@ jobs:
1717 - name : Checkout repository
1818 uses : actions/checkout@v4
1919
20- - name : Create new branch
21- id : create_branch
20+ - name : Make draft item and get branch name
21+ id : get_name
2222 run : |
23- git config --global user.name 'github-actions[bot]'
24- git config --global user.email 'github-actions[bot]@users.noreply.github.com'
2523 branch_name=$(echo "${{ github.event.inputs.name }}" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
26- echo "Branch name: ${branch_name}"
27- git checkout -b "$branch_name"
2824
29- # Create the draft item
25+ # Create an item in drafts directory
3026 touch drafts/${branch_name}
3127 git add drafts
3228 git commit -m "create PR from branch ${branch_name}"
3329
34- git push origin "$branch_name"
3530 echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
3631
3732 - name : Create Pull Request
3833 id : create_pr
3934 uses : peter-evans/create-pull-request@v7
4035 with :
4136 token : ${{ secrets.GITHUB_TOKEN }}
42- branch : ${{ steps.create_branch .outputs.branch_name }}
37+ branch : ${{ steps.get_name .outputs.branch_name }}
4338 base : main
44- title : posts/${{ steps.create_branch .outputs.branch_name }}
39+ title : posts/${{ steps.get_name .outputs.branch_name }}
4540 body-path : ' ${{ github.workspace }}/.github/PULL_REQUEST_TEMPLATE/post.md'
4641 labels : ' post'
You can’t perform that action at this time.
0 commit comments