Skip to content

Commit

Permalink
fix: add condition to e2e-fork workflow (#6796)
Browse files Browse the repository at this point in the history
* fix: add condition to e2e-fork workflow

* fix: update e2e.yaml to disallow running on forks
  • Loading branch information
damiannolan authored Jul 10, 2024
1 parent 69ae4d8 commit ba3c32a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/e2e-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# dynamically build a matrix of test/test suite pairs to run
build-test-matrix:
# run this job on forks and copies of ibc-go, for example: a public fork or a private copy of ibc-go.
if: ${{ github.repository != 'cosmos/ibc-go' || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
if: ${{ github.repository != 'cosmos/ibc-go' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand All @@ -37,7 +37,7 @@ jobs:
# dynamically build a matrix of test/test suite pairs to run
build-test-matrix-wasm:
# run this job on forks and copies of ibc-go, for example: a public fork or a private copy of ibc-go.
if: ${{ github.repository != 'cosmos/ibc-go' || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
if: ${{ github.repository != 'cosmos/ibc-go' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand All @@ -62,7 +62,7 @@ jobs:
RELAYER_ID: "hermes" # by default use hermes for fork e2es.
FORK: "true"
# run this job on forks and copies of ibc-go, for example: a public fork or a private copy of ibc-go.
if: ${{ github.repository != 'cosmos/ibc-go' || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
if: ${{ github.repository != 'cosmos/ibc-go' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
needs:
- build-test-matrix
runs-on: ubuntu-latest
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
# RELAYER_ID: "hyperspace" # by default use hyperspace relayer for fork wasm tests.
# FORK: "true"
# run this job on forks and copies of ibc-go, for example: a public fork or a private copy of ibc-go.
# if: ${{ github.repository != 'cosmos/ibc-go' || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
# if: ${{ github.repository != 'cosmos/ibc-go' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
# needs: build-test-matrix-wasm
# runs-on: ubuntu-latest
# strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# determine-image-tag will either output the PR number e.g. pr-1234 or the string main.
# this will be used to tag the images that are built during the workflow.
determine-image-tag:
if: ${{ !github.event.pull_request.draft && github.repository == 'cosmos/ibc-go' && github.actor != 'dependabot[bot]' }}
if: ${{ !github.event.pull_request.draft && github.repository == 'cosmos/ibc-go' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
outputs:
simd-tag: ${{ steps.get-tag.outputs.simd-tag }}
Expand All @@ -50,7 +50,7 @@ jobs:
e2e:
# we will be running this job if the PR has not yet been marked for review, and we push additional changes.
# we skip the job in this case.
if: ${{ !github.event.pull_request.draft && github.repository == 'cosmos/ibc-go' && github.actor != 'dependabot[bot]' }}
if: ${{ !github.event.pull_request.draft && github.repository == 'cosmos/ibc-go' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
needs: determine-image-tag # we are required to have a docker tag before we can build any images.
uses: ./.github/workflows/e2e-test-workflow-call.yml
# unless we explicitly tell the workflow to inherit secrets, required secrets such as GITHUB_TOKEN will not be
Expand Down

0 comments on commit ba3c32a

Please sign in to comment.