1
1
Fork 0

Trying another push approch

Signed by @spirillen
This commit is contained in:
spirillen 2021-09-11 02:41:46 +02:00
parent 1ac85a2d73
commit ff64ecd362
No known key found for this signature in database
GPG Key ID: 30562ED6FB236E4E
1 changed files with 7 additions and 16 deletions

View File

@ -22,24 +22,10 @@ after_script:
- echo "After script section"
- echo "For example you might do some clean up here"
- echo -e "After script section...\n"
- git add .
# - git add .
# - git commit -m "Auto committed from the CI runner `date '+%F %T %Z %z'` [skip ci]"
- git status
# - git status
# - git push -u origin ${CI_COMMIT_REF_NAME}
- |-
# Check if we have modifications to commit
CHANGES=$(git status --porcelain | wc -l)
if ["$CHANGES" -gt "0"]; then
# Show the status of files that are about to be created, updated or deleted
git status
# Commit all changes
git commit -m "Auto committed from the CI runner `date '+%F %T %Z %z'` [skip ci]"
# Update the repository and make sure to skip the pipeline create for this commit
git push origin "${CI_DEFAULT_BRANCH}" -o ci.skip
fi
build:
stage: build
@ -71,3 +57,8 @@ deploy1:
stage: deploy
script:
- echo "Do your deploy here"
- 'standard-version --releaseCommitMessageFormat "chore(release): {{currentTag}}"'
- git remote show origin
- git remote set-url --push origin git@gitlab:$CI_PROJECT_PATH
- git remote show origin
- git push --follow-tags origin HEAD:$CI_COMMIT_REF_NAME