Skip to content

Commit 4639219

Browse files
author
Derek Barbosa
committed
Make branch aware of HEAD:main, fetch origin
Signed-off-by: Derek Barbosa <debarbos@redhat.com>
1 parent 4a0c96d commit 4639219

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,11 @@ deploy:
141141
# so just deploy code to main
142142
- git config user.name "Gitlab Runner"
143143
- git config user.email ""
144+
- git fetch origin
144145
- git add info/owners.yaml info/RHMAINTAINERS info/CODEOWNERS
145146
# make it so that job will not fail if there is nothing to commit
146147
- git diff-index --quiet HEAD || git commit -m "[Gitlab CI/CD] Automated rebuild of info/*"
147-
- git push https://gitlab-ci-token:$MAKE_MAINT@gitlab.com/redhat/centos-stream/src/kernel/documentation.git $CI_DEFAULT_BRANCH
148+
- git push https://gitlab-ci-token:$MAKE_MAINT@gitlab.com/redhat/centos-stream/src/kernel/documentation.git HEAD:main
148149

149150
rules:
150151
- if: '$CI_PROJECT_NAMESPACE == "redhat/centos-stream/src/kernel" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

0 commit comments

Comments
 (0)