Skip to content

Commit 7fa7db2

Browse files
kfischer-okarinRedmine Patch Meetup
authored and
Redmine Patch Meetup
committed
Change patch file name to "Branch Name".patch
1 parent 407344c commit 7fa7db2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/create-patch.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ jobs:
2222
git config --global user.email "$AUTHOR_EMAIL"
2323
git config --global user.name "$AUTHOR_NAME"
2424
git commit -m "Patch for `cat .branch-name`"
25-
git format-patch development..HEAD --stdout -k > patch.diff
25+
PATCH_FILE=`cat .branch-name | sed 's/\//_/g'`.patch # Replace forward slash in branch name with _
26+
git format-patch development..HEAD --stdout -k > $PATCH_FILE
27+
echo "::set-output name=PATCH_FILE::$PATCH_FILE"
28+
id: patch-creator
2629
env:
2730
AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
2831
AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
2932
- uses: actions/upload-artifact@v2
3033
with:
3134
name: patch
32-
path: patch.diff
35+
path: ${{ steps.patch-creator.outputs.PATCH_FILE }}

0 commit comments

Comments
 (0)