Skip to content

Commit 508672e

Browse files
committed
feat: tags is now configurable
1 parent dbccd85 commit 508672e

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎action.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ inputs:
1919
force:
2020
description: 'Determines if force push is used'
2121
required: false
22+
tags:
23+
description: 'Determines if --tags is used'
24+
required: false
2225
directory:
2326
description: 'Directory to change to before pushing.'
2427
required: false

‎start.sh‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set -e
33

44
INPUT_BRANCH=${INPUT_BRANCH:-master}
55
INPUT_FORCE=${INPUT_FORCE:-false}
6+
INPUT_TAGS=${INPUT_TAGS:-false}
67
INPUT_DIRECTORY=${INPUT_DIRECTORY:-'.'}
78
_FORCE_OPTION=''
89
REPOSITORY=${INPUT_REPOSITORY:-$GITHUB_REPOSITORY}
@@ -17,8 +18,12 @@ if ${INPUT_FORCE}; then
1718
_FORCE_OPTION='--force'
1819
fi
1920

21+
if ${TAGS}; then
22+
_TAGS='--tags'
23+
fi
24+
2025
cd ${INPUT_DIRECTORY}
2126

2227
remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${REPOSITORY}.git"
2328

24-
git push "${remote_repo}" HEAD:${INPUT_BRANCH} --follow-tags $_FORCE_OPTION --tags;
29+
git push "${remote_repo}" HEAD:${INPUT_BRANCH} --follow-tags $_FORCE_OPTION $_TAGS;

0 commit comments

Comments
 (0)