skip github jobs on forks

I get scary emails from github about failed jobs for every commit pushed to my
yacy fork. But the jobs should not run on my forked repo in the first place.

This problem is not unique to yacy:
https://github.com/actions/runner/issues/859

Alternatively every contributor could disable workflows in the settings of
their fork repo:
https://docs.github.com/en/actions/managing-workflow-runs/disabling-and-enabling-a-workflow
pull/564/head
Thomas Koch 2 years ago
parent 3230df6e2b
commit d9d1bc8c65

@ -5,6 +5,7 @@ on: pull_request
jobs:
build:
runs-on: ubuntu-latest
if: "github.repository == 'yacy/yacy_search_server'
steps:
- uses: actions/checkout@master
- name: Set up JDK 8

@ -5,6 +5,7 @@ on: push
jobs:
build:
runs-on: self-hosted
if: "github.repository == 'yacy/yacy_search_server'
steps:
- uses: actions/checkout@master
- name: Set up JDK 8

Loading…
Cancel
Save