From c36c8ad555e9d1432013c0f8e97f997d9695d1c7 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas <22591718+RomarQ@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:45:09 +0000 Subject: [PATCH] chore(ci): handle pr's from forked repositories (#2633) * chore(ci): handle pr's from forked repositories * chore(ci): skip build-and-coverage action for PR's originated from forks --- .github/workflows/build.yml | 8 +++----- .github/workflows/coverage.yml | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index efd3024a7f..bb6b026aaa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -461,9 +461,7 @@ jobs: docker-moonbeam: runs-on: ubuntu-latest needs: ["set-tags", "build"] - if: | - ${{! needs.set-tags.outputs.image_exists }} && - ${{! github.event.pull_request.head.repo.fork }} + if: ${{ !needs.set-tags.outputs.image_exists && !github.event.pull_request.head.repo.fork }} steps: - name: Checkout uses: actions/checkout@v3 @@ -623,7 +621,7 @@ jobs: ## Generate old spec using latest published node, modify it, and generate raw spec chmod uog+x tmp/moonbeam_rt tmp/moonbeam_rt build-spec --chain ${{ matrix.chain }}-local > tmp/${{ matrix.chain }}-plain-spec.json - pnpm tsx scripts/modify-plain-specs.ts process tmp/${{ matrix.chain }}-plain-spec.json tmp/${{ matrix.chain }}-modified-spec.json + pnpm tsx scripts/modify-plain-specs.ts process tmp/${{ matrix.chain }}-plain-spec.json tmp/${{ matrix.chain }}-modified-spec.json tmp/moonbeam_rt build-spec --chain tmp/${{ matrix.chain }}-modified-spec.json --raw > tmp/${{ matrix.chain }}-raw-spec.json ## Start zombie network and run tests @@ -637,7 +635,7 @@ jobs: ## Generate old spec using latest published node, modify it, and generate raw spec chmod uog+x tmp/moonbeam_rt tmp/moonbeam_rt build-spec --chain ${{ matrix.chain }}-local > tmp/${{ matrix.chain }}-plain-spec.json - pnpm tsx scripts/modify-plain-specs.ts process tmp/${{ matrix.chain }}-plain-spec.json tmp/${{ matrix.chain }}-modified-spec.json + pnpm tsx scripts/modify-plain-specs.ts process tmp/${{ matrix.chain }}-plain-spec.json tmp/${{ matrix.chain }}-modified-spec.json tmp/moonbeam_rt build-spec --chain tmp/${{ matrix.chain }}-modified-spec.json --raw > tmp/${{ matrix.chain }}-raw-spec.json ## Start zombie network and run tests diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e8c41059ae..a9edafe991 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -90,6 +90,7 @@ jobs: runs-on: labels: bare-metal needs: ["set-tags"] + if: ${{ !github.event.pull_request.head.repo.fork }} timeout-minutes: 60 env: RUSTC_WRAPPER: "sccache"