before_script: # Ensure prerequisites are installed - 'which ssh-agent || (apk update && apk add openssh-client git)' # Launch ssh agent and add our key - eval $(ssh-agent -s) - echo "${SSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null # Ensure known hosts exists and is populated - mkdir ~/.ssh && chmod 700 ~/.ssh - ssh-keyscan -p 2224 gitlab.jamma.life >> ~/.ssh/known_hosts push_github: type: deploy environment: name: github url: github.com/jmhbnz/tooling script: # Output git status - git checkout master && git status # Add a new remote for github - git remote add github git@github.com:jmhbnz/tooling.git || true # Push to the new remote - git push github master only: refs: - master