Skip to content

Update trigger-9.yml #120

Update trigger-9.yml

Update trigger-9.yml #120

# # 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