From e29edd7766b146c272bd590b86064534abadaaea Mon Sep 17 00:00:00 2001 From: Derpius <49565664+Derpius@users.noreply.github.com> Date: Sat, 2 Dec 2023 15:54:29 +0000 Subject: [PATCH] ci: fix CI when run from forks --- .github/workflows/lest.yml | 3 --- .github/workflows/pull_request.yml | 9 +++++++++ .github/workflows/push_feature.yml | 10 ++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pull_request.yml create mode 100644 .github/workflows/push_feature.yml diff --git a/.github/workflows/lest.yml b/.github/workflows/lest.yml index 26a3c66..bc8d1ef 100644 --- a/.github/workflows/lest.yml +++ b/.github/workflows/lest.yml @@ -2,9 +2,6 @@ name: Lest CI on: workflow_call: - push: - branches-ignore: - - master jobs: lint: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..ab062d3 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,9 @@ +name: Pull request created or updated + +on: pull_request + +jobs: + lest: + uses: "./.github/workflows/lest.yml" + # Only run on forks to avoid duplicating the "push" workflow + if: ${{ github.event.pull_request.head.repo.fork }} diff --git a/.github/workflows/push_feature.yml b/.github/workflows/push_feature.yml new file mode 100644 index 0000000..e6bedce --- /dev/null +++ b/.github/workflows/push_feature.yml @@ -0,0 +1,10 @@ +name: Push to feature branch + +on: + push: + branches-ignore: + - master + +jobs: + lest: + uses: ./.github/workflows/lest.yml