ci: do not trigger gitlab CI on pushed to upstream branches

Dependabot pushes branches directly to the upstream repository. This causes
double-triggers of gitlab CI. Prevent it by running gitlab CI only for
the main branch.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2021-08-31 14:22:28 +02:00 committed by Ondřej Budai
parent 36dff5abe2
commit 97d6142609

View file

@ -1,7 +1,13 @@
# inspired by rhinstaller/anaconda
name: Trigger GitLab CI
on: [push, pull_request_target]
# do not trigger gitlab CI on pushes to upstream
on:
pull_request_target:
push:
branches:
- main
jobs:
pr-info: