Skip to content

Commit

Permalink
Restrict GitHub Actions to run only on OpenSearch repo (#9284) (#9381)
Browse files Browse the repository at this point in the history
* Restrict GitHub Actions to run only on OpenSearch repo



* Revert changes unlikely to run on forks



---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
  • Loading branch information
dbwiddis authored Aug 16, 2023
1 parent 0c49c51 commit 8e79704
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
# Enforces the update of a changelog file on every pull request
verify-changelog:
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
build:
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ permissions:

jobs:
gradle-check:
if: github.repository == 'opensearch-project/OpenSearch'
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to create or update comment (peter-evans/create-or-update-comment)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lucene-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

jobs:
publish-snapshots:
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on: [pull_request]

jobs:
precommit:
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-maven-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
build-and-publish-snapshots:
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ubuntu-latest

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
permissions: {}
jobs:
build:
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ubuntu-latest
steps:
- name: GitHub App token
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [pull_request]
jobs:
validate:
name: Validate
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit 8e79704

Please sign in to comment.