Skip to content

Commit

Permalink
chore(ci): handle pr's from forked repositories (#2633)
Browse files Browse the repository at this point in the history
* chore(ci): handle pr's from forked repositories
* chore(ci): skip build-and-coverage action for PR's originated from forks
  • Loading branch information
RomarQ authored Jan 31, 2024
1 parent c0baa86 commit c36c8ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c36c8ad

Please sign in to comment.