From 9a30674f2b69dddd9597a161c002ba115eeb16da Mon Sep 17 00:00:00 2001 From: Bobby Martin Date: Mon, 9 Dec 2019 16:03:48 -0800 Subject: [PATCH 1/4] Add support for git lfs --- action.yml | 4 ++++ entrypoint.sh | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/action.yml b/action.yml index aba169a..0b1ff8f 100644 --- a/action.yml +++ b/action.yml @@ -17,6 +17,10 @@ inputs: description: 'Allow fast forward merge' required: false default: false + allow_git_lfs: + description: 'Allow git lfs support' + required: false + default: false ff_only: description: 'Refuse to perform a non fast forward merge (requires allow_ff=true)' required: false diff --git a/entrypoint.sh b/entrypoint.sh index 05bb39c..b8c3fd0 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,6 +7,7 @@ echo " 'Nightly Merge Action' is using the following input:" echo " - stable_branch = '$INPUT_STABLE_BRANCH'" echo " - development_branch = '$INPUT_DEVELOPMENT_BRANCH'" echo " - allow_ff = $INPUT_ALLOW_FF" +echo " - allow_git_lfs = $INPUT_GIT_LFS" echo " - ff_only = $INPUT_FF_ONLY" echo " - allow_forks = $INPUT_ALLOW_FORKS" echo " - user_name = $INPUT_USER_NAME" @@ -69,5 +70,9 @@ set -o xtrace # Do the merge git merge $FF_MODE --no-edit $INPUT_STABLE_BRANCH +if $INPUT_GIT_LFS; then + git lfs pull +fi + # Push the branch git push origin $INPUT_DEVELOPMENT_BRANCH From 7879f7b71e09bb0ceb5e3a0f2f375ae70a60a23f Mon Sep 17 00:00:00 2001 From: Bobby Martin Date: Mon, 9 Dec 2019 16:05:48 -0800 Subject: [PATCH 2/4] Add readme info for git lfs use --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 06539ee..19e05a7 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,10 @@ The name of the development branch (default `devel`). Allow fast forward merge (default `false`). If not enabled, merges will use `--no-ff`. +### `allow_git_lfs` + +All support for repositories that use `git lfs` (default `false`). + ### `ff_only` Refuse to merge and exit unless the current HEAD is already up to date or the From be24dcec260dce280ace97b11c8fe8bcd781ec12 Mon Sep 17 00:00:00 2001 From: Bobby Martin Date: Mon, 9 Dec 2019 16:09:12 -0800 Subject: [PATCH 3/4] Add comment in shell script --- entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/entrypoint.sh b/entrypoint.sh index b8c3fd0..b8dc96d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -70,6 +70,7 @@ set -o xtrace # Do the merge git merge $FF_MODE --no-edit $INPUT_STABLE_BRANCH +# Pull lfs if enabled if $INPUT_GIT_LFS; then git lfs pull fi From c7ef1d9be73519ec102e93a7ba6638bc051ba427 Mon Sep 17 00:00:00 2001 From: Bobby Martin Date: Mon, 9 Dec 2019 17:17:51 -0800 Subject: [PATCH 4/4] Fix readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 19e05a7..2225134 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Allow fast forward merge (default `false`). If not enabled, merges will use ### `allow_git_lfs` -All support for repositories that use `git lfs` (default `false`). +Allow support for repositories that use `git lfs` (default `false`). ### `ff_only`