feat: tags is now configurable
This commit is contained in:
parent
dbccd851c4
commit
508672e3d6
@ -19,6 +19,9 @@ inputs:
|
||||
force:
|
||||
description: 'Determines if force push is used'
|
||||
required: false
|
||||
tags:
|
||||
description: 'Determines if --tags is used'
|
||||
required: false
|
||||
directory:
|
||||
description: 'Directory to change to before pushing.'
|
||||
required: false
|
||||
|
7
start.sh
7
start.sh
@ -3,6 +3,7 @@ set -e
|
||||
|
||||
INPUT_BRANCH=${INPUT_BRANCH:-master}
|
||||
INPUT_FORCE=${INPUT_FORCE:-false}
|
||||
INPUT_TAGS=${INPUT_TAGS:-false}
|
||||
INPUT_DIRECTORY=${INPUT_DIRECTORY:-'.'}
|
||||
_FORCE_OPTION=''
|
||||
REPOSITORY=${INPUT_REPOSITORY:-$GITHUB_REPOSITORY}
|
||||
@ -17,8 +18,12 @@ if ${INPUT_FORCE}; then
|
||||
_FORCE_OPTION='--force'
|
||||
fi
|
||||
|
||||
if ${TAGS}; then
|
||||
_TAGS='--tags'
|
||||
fi
|
||||
|
||||
cd ${INPUT_DIRECTORY}
|
||||
|
||||
remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${REPOSITORY}.git"
|
||||
|
||||
git push "${remote_repo}" HEAD:${INPUT_BRANCH} --follow-tags $_FORCE_OPTION --tags;
|
||||
git push "${remote_repo}" HEAD:${INPUT_BRANCH} --follow-tags $_FORCE_OPTION $_TAGS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user