My goal is to create Gitlab yml file in order to automatically merge code from release to master branch which will be run on a schedule (once a week)
Here is my .gitlab-ci.yml:
image: "python:3.8"
stages:
- build
- test
- release
Build:
stage: build
script:
- <some code here>
Test:
stage: test
script:
- <some code here>
job:on-schedule:
stage: release
only:
- schedules
script:
- git config --global user.email myEmail@gmail.com
- git config --global user.name "myUserName"
- git checkout release
- git checkout master
- git merge release
But I'm getting the following error:
error: pathspec 'release' did not match any file(s) known to git
Cleaning up file based variables
00:00
ERROR: Job failed: exit code 1
. I'd appreciate it if you have any ideas on how to fix that.