Skip to content

Commit

Permalink
Change patch file name to "Branch Name".patch
Browse files Browse the repository at this point in the history
  • Loading branch information
kfischer-okarin authored and Redmine Patch Meetup committed Dec 19, 2020
1 parent 5604ea0 commit 701da01
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/create-patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ jobs:
git config --global user.email "$AUTHOR_EMAIL"
git config --global user.name "$AUTHOR_NAME"
git commit -m "Patch for `cat .branch-name`"
git format-patch development..HEAD --stdout -k > patch.diff
PATCH_FILE=`cat .branch-name | sed 's/\//_/g'`.patch # Replace forward slash in branch name with _
git format-patch development..HEAD --stdout -k > $PATCH_FILE
echo "::set-output name=PATCH_FILE::$PATCH_FILE"
id: patch-creator
env:
AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
- uses: actions/upload-artifact@v2
with:
name: patch
path: patch.diff
path: ${{ steps.patch-creator.outputs.PATCH_FILE }}

0 comments on commit 701da01

Please sign in to comment.