Update trigger-9.yml #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# # inspired by rhinstaller/anaconda | |
# name: Trigger GitLab CI | |
# on: | |
# pull_request: | |
# branches: | |
# - "main" | |
# jobs: | |
# trigger-gitlab: | |
# runs-on: ubuntu-latest | |
# env: | |
# SSH_KEY: ${{ secrets.GITLAB_SSH_KEY }} | |
# steps: | |
# - name: Clone repository | |
# uses: actions/checkout@v2 | |
# with: | |
# # otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger) | |
# ref: ${{ github.event.pull_request.head.sha }} | |
# fetch-depth: 0 | |
# - name: Push to gitlab | |
# run: | | |
# mkdir -p ~/.ssh | |
# echo "${SSH_KEY}" > ~/.ssh/id_rsa | |
# chmod 400 ~/.ssh/id_rsa | |
# touch ~/.ssh/known_hosts | |
# ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts | |
# git remote add ci [email protected]:yih1/test-ci.git | |
# if [ ${{ github.event.pull_request.number }} ]; then | |
# git checkout -b PR-${{ github.event.pull_request.number }} | |
# fi | |
# git push -f ci |