diff --git a/README.md b/README.md index 3ab7ba7..b5e2a54 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,7 @@ jobs: | force_with_lease | boolean | false | Determines if force-with-lease push is used. Please specify the corresponding branch inside `ref` section of the checkout action e.g. `ref: ${{ github.head_ref }}`. Be aware, if you want to update the branch and the corresponding tag please use the `force` parameter instead of the `force_with_lease` option. | | atomic | boolean | true | Determines if [atomic](https://git-scm.com/docs/git-push#Documentation/git-push.txt---no-atomic) push is used. | | push_to_submodules | string | 'on-demand' | Determines if --recurse-submodules= is used. The value defines the used strategy. | +| push_only_tags | boolean | false | Determines if the action should only push the tags, default false | | tags | boolean | false | Determines if `--tags` is used. | | directory | string | '.' | Directory to change to before pushing. | | repository | string | '' | Repository name.
Default or empty repository name represents
current github repository.
If you want to push to other repository,
you should make a [personal access token](https://github.com/settings/tokens)
and use it as the `github_token` input. | diff --git a/action.yml b/action.yml index 245d0d1..ca7a617 100644 --- a/action.yml +++ b/action.yml @@ -39,6 +39,9 @@ inputs: tags: description: 'Determines if --tags is used' required: false + push_only_tags: + description: 'Determines if the action should only push the tags, default false' + required: false directory: description: 'Directory to change to before pushing.' required: false diff --git a/start.sh b/start.sh index 7789ed5..cda59a6 100644 --- a/start.sh +++ b/start.sh @@ -6,6 +6,7 @@ INPUT_FORCE=${INPUT_FORCE:-false} INPUT_FORCE_WITH_LEASE=${INPUT_FORCE_WITH_LEASE:-false} INPUT_SSH=${INPUT_SSH:-false} INPUT_TAGS=${INPUT_TAGS:-false} +INPUT_PUSH_ONLY_TAGS=${INPUT_PUSH_ONLY_TAGS:-false} INPUT_DIRECTORY=${INPUT_DIRECTORY:-"."} INPUT_PUSH_TO_SUBMODULES=${INPUT_PUSH_TO_SUBMODULES:-""} _ATOMIC_OPTION="" @@ -53,6 +54,8 @@ fi if ! ${INPUT_FORCE_WITH_LEASE}; then ADDITIONAL_PARAMETERS="${remote_repo} HEAD:${INPUT_BRANCH}" +elif ${INPUT_PUSH_ONLY_TAGS}; then + ADDITIONAL_PARAMETERS="${remote_repo}" fi if ${INPUT_FORCE_WITH_LEASE} && ${INPUT_TAGS}; then