Skip to content

.github/workflows: trigger gitlab as soon as possible #1

.github/workflows: trigger gitlab as soon as possible

.github/workflows: trigger gitlab as soon as possible #1

name: Trigger GitLab
# NOTE(mhayden): Restricting branches prevents jobs from being doubled since
# a push to a pull request triggers two events.
on:
pull_request:
branches:
- "*"
push:
branches:
- main
jobs:
gitlab-ci-helper:
name: "Gitlab CI trigger helper"
runs-on: ubuntu-latest
env:
SKIP_CI: ${{ (github.event.pull_request.draft == true || contains(github.event.pull_request.labels.*.name, 'WIP')) && !contains(github.event.pull_request.labels.*.name, 'WIP+test') }}
steps:
- name: Write PR status
run: echo "$SKIP_CI" > SKIP_CI.txt
- name: Upload status
uses: actions/upload-artifact@v3
with:
name: PR_STATUS
path: SKIP_CI.txt