Fix CI auto-push

This commit is contained in:
jaseg 2020-11-18 14:26:07 +01:00
parent a8df29547c
commit f757003a62
2 changed files with 4 additions and 1 deletions

View file

@ -19,3 +19,6 @@ release:
- gitlab-release --zip "release-${CI_COMMIT_TAG}.zip" * - gitlab-release --zip "release-${CI_COMMIT_TAG}.zip" *
only: only:
- tags - tags
- /^v-nightly-.*$/
except:
- schedules

View file

@ -69,7 +69,7 @@ git tag -a "v-productdb-$PRODUCTDB_VERSION" -m "Auto-release for STM32 Product D
if [ ! -z ${GITLAB_ACCESS_TOKEN+x} ]; then if [ ! -z ${GITLAB_ACCESS_TOKEN+x} ]; then
echo "Access token found, pushing commit and tags" echo "Access token found, pushing commit and tags"
git remote add -f ci-origin https://oauth2:${GITLAB_ACCESS_TOKEN}@gitlab.com/${CI_PROJECT_PATH} git remote add -f ci-origin https://oauth2:${GITLAB_ACCESS_TOKEN}@gitlab.com/${CI_PROJECT_PATH}
git push --tags --force ci-origin release git push --tags --force ci-origin HEAD:release
else else
echo "No access token found. Not pushing anything." echo "No access token found. Not pushing anything."
fi fi