Skip to content
Snippets Groups Projects

Changed github push PR action.

Merged Markus Scheidgen requested to merge github-actions into develop
1 file
+ 8
7
Compare changes
  • Side-by-side
  • Inline
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 \
Loading