Skip to content

Multi-thread fix and request merging #257

Multi-thread fix and request merging

Multi-thread fix and request merging #257

Workflow file for this run

name: NERSC
on:
pull_request_target
env:
PR_NUMBER: ${{ github.event.number }}
jobs:
authorize:
environment:
${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
sync-with-nersc:
needs: authorize
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup git
run: |
git config --global user.name "PDC BOT"
git config --global user.email "pdc@example.com"
- name: Create PR branch
run: |
PR_SHA=$(git rev-parse --short "$GITHUB_SHA")
git fetch origin pull/${PR_NUMBER}/head:PR-${PR_SHA}
git remote add gitlab https://${{ secrets.NERSC_GITLAB_TOKEN_NAME }}:${{ secrets.NERSC_GITLAB_TOKEN }}@${{ secrets.NERSC_GITLAB_URL }}
git checkout PR-${PR_SHA}
git push -f gitlab -u PR-${PR_SHA}