Skip to content
Snippets Groups Projects
Commit 9cbc1fe9 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Changed github push PR action.

parent bfb3e392
No related branches found
No related tags found
1 merge request!1180Changed github push PR action.
Pipeline #160748 passed
name: Push the branch to the home Project at MPCDF's gitlab
name: Push the PR to the home Project at MPCDF's gitlab
on:
pull_request_review:
types: [submitted]
pull_request_target:
paths-ignore:
- '.gitlab-ci.*'
- '.github/**'
jobs:
push-to-gitlab:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
env:
gitlab_ref: "github-${{ github.event.pull_request.number }}-${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.head.ref }}"
steps:
- name: Git checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: '0'
ref: ${{ github.event.pull_request.head.ref }}
ref: ${{ github.event.pull_request.head.sha }}
- name: Git push
run: |
git push "https://username:${{ secrets.GITLAB_ACCESS_TOKEN }}@gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git" ${{ github.event.pull_request.head.ref }}:$gitlab_ref -f
git push "https://username:${{ secrets.GITLAB_ACCESS_TOKEN }}@gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git" HEAD:refs/heads/$gitlab_ref -f
- name: Create MR
run: |
curl -X POST -L -G \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment