Skip to content

Hopefully now, variable is expanded instead using the name #4

Hopefully now, variable is expanded instead using the name

Hopefully now, variable is expanded instead using the name #4

Workflow file for this run

name: Mirror to Gitlab to trigger CI
on:
push:
pull_request_target:
schedule:
- cron: '1 5 2 * *'
jobs:
check_permission:
runs-on: ubuntu-latest
if: github.repository_owner == 'Parallel-in-Time'
steps:
- name: Query permissions of triggering actor
id: query_permission_triggering_actor
if: github.event_name == 'pull_request_target'
uses: actions-cool/check-user-permission@v2
with:
username: ${{ github.triggering_actor }}
require: write
- name: Interpret the queried result
if: github.event_name == 'pull_request_target'
run: |
echo $steps.query_permission_triggering_actor.outputs.require-result
exit !steps.query_permission_triggering_actor.outputs.require-result
- name: Pass if workflow from push or schedule
if: >-
(github.event_name == 'push') ||
(github.event_name == 'schedule')
run: exit 0
- name: Fail for other triggers
if: >-
(github.event_name != 'push') &&
(github.event_name != 'schedule') &&
(github.event_name != 'pull_request_target')
run: exit 1
mirror_to_gitlab:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Parallel-in-Time'}}
needs:
- check_permission
steps:
- name: Checkout
uses: actions/checkout@v1
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Mirror and wait for Gitlab-CI
uses: jakob-fritz/github2lab_action@Iss35_mirror_pr
env:
MODE: 'all' # Either 'mirror', 'get_status', 'get_artifact', or 'all'
GITLAB_TOKEN: ${{ secrets.GITLAB_SECRET }}
FORCE_PUSH: "true"
GITLAB_HOSTNAME: "gitlab.jsc.fz-juelich.de"
GITLAB_PROJECT_ID: "6029"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}