update git push to remote action
Signed-off-by: GuillaumeFalourd <guillaume.falourd@zup.com.br>
This commit is contained in:
parent
f980b48b41
commit
5f659c1817
1 changed files with 4 additions and 2 deletions
|
@ -53,8 +53,9 @@ runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Git push and commit origin
|
- name: Git push and commit origin
|
||||||
if: ${{ inputs.remote_repository }} == 'origin'
|
if: ${{ inputs.remote_repository == 'origin' }}
|
||||||
run: |
|
run: |
|
||||||
|
echo "##### Git Push and Commit ORIGIN #####"
|
||||||
CURRENT_BRANCH=${GITHUB_REF}
|
CURRENT_BRANCH=${GITHUB_REF}
|
||||||
case $CURRENT_BRANCH in "refs/heads/"*)
|
case $CURRENT_BRANCH in "refs/heads/"*)
|
||||||
CURRENT_BRANCH=$(echo "$CURRENT_BRANCH" | sed "s@refs/heads/@@")
|
CURRENT_BRANCH=$(echo "$CURRENT_BRANCH" | sed "s@refs/heads/@@")
|
||||||
|
@ -101,8 +102,9 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Git push and commit remote
|
- name: Git push and commit remote
|
||||||
if: ${{ inputs.remote_repository }} != 'origin'
|
if: ${{ inputs.remote_repository != 'origin' }}
|
||||||
run: |
|
run: |
|
||||||
|
echo "##### Git Push and Commit REMOTE #####"
|
||||||
if [ -z "${{ inputs.access_token }}" ]; then
|
if [ -z "${{ inputs.access_token }}" ]; then
|
||||||
echo "WARNING: The access_token input is mandatory to push files to another repository."
|
echo "WARNING: The access_token input is mandatory to push files to another repository."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue