Skip to content

Commit 6d68919

Browse files
authored
Prevent running gh actions on forks (#5107)
1 parent 423bf34 commit 6d68919

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

.github/workflows/closed-issue-message.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
types: [closed]
55
jobs:
66
auto_comment:
7+
if: github.repository == 'aws/aws-sdk-java-v2'
78
runs-on: ubuntu-latest
89
permissions:
910
issues: write
@@ -13,5 +14,5 @@ jobs:
1314
# These inputs are both required
1415
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1516
message: |
16-
This issue is now closed. Comments on closed issues are hard for our team to see.
17+
This issue is now closed. Comments on closed issues are hard for our team to see.
1718
If you need more assistance, please open a new issue that references this one.

.github/workflows/codebuild-ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414

1515
jobs:
1616
jdk8-build:
17+
if: github.repository == 'aws/aws-sdk-java-v2'
1718
runs-on: ubuntu-latest
1819
steps:
1920
- name: Configure AWS Credentials
@@ -28,6 +29,7 @@ jobs:
2829
with:
2930
project-name: aws-sdk-java-v2
3031
jdk11-build:
32+
if: github.repository == 'aws/aws-sdk-java-v2'
3133
runs-on: ubuntu-latest
3234
steps:
3335
- name: Configure AWS Credentials
@@ -42,6 +44,7 @@ jobs:
4244
with:
4345
project-name: aws-sdk-java-v2-JDK11
4446
jdk17-build:
47+
if: github.repository == 'aws/aws-sdk-java-v2'
4548
runs-on: ubuntu-latest
4649
steps:
4750
- name: Configure AWS Credentials
@@ -56,6 +59,7 @@ jobs:
5659
with:
5760
project-name: aws-sdk-java-v2-JDK17
5861
jdk21-build:
62+
if: github.repository == 'aws/aws-sdk-java-v2'
5963
runs-on: ubuntu-latest
6064
steps:
6165
- name: Configure AWS Credentials
@@ -70,6 +74,7 @@ jobs:
7074
with:
7175
project-name: aws-java-sdk-v2-JDK21
7276
windows-jdk8-build:
77+
if: github.repository == 'aws/aws-sdk-java-v2'
7378
runs-on: ubuntu-latest
7479
steps:
7580
- name: Configure AWS Credentials
@@ -83,6 +88,7 @@ jobs:
8388
with:
8489
project-name: aws-sdk-java-v2-JDK8-windows
8590
native-image-test:
91+
if: github.repository == 'aws/aws-sdk-java-v2'
8692
runs-on: ubuntu-latest
8793
steps:
8894
- name: Configure AWS Credentials
@@ -96,6 +102,7 @@ jobs:
96102
with:
97103
project-name: aws-sdk-java-v2-native-image-test
98104
sonar-cloud-build:
105+
if: github.repository == 'aws/aws-sdk-java-v2'
99106
runs-on: ubuntu-latest
100107
steps:
101108
- name: Configure AWS Credentials
@@ -118,6 +125,7 @@ jobs:
118125
BRANCH: ${{ github.head_ref || 'master'}}
119126
BASE: ${{ github.base_ref }}
120127
endpoints-tests:
128+
if: github.repository == 'aws/aws-sdk-java-v2'
121129
runs-on: ubuntu-latest
122130
steps:
123131
- name: Configure AWS Credentials

.github/workflows/handle-stale-discussions.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ on:
77

88
jobs:
99
handle-stale-discussions:
10+
if: github.repository == 'aws/aws-sdk-java-v2'
1011
name: Handle stale discussions
1112
runs-on: ubuntu-latest
1213
permissions:
1314
discussions: write
1415
steps:
1516
- name: Stale discussions action
1617
uses: aws-github-ops/handle-stale-discussions@v1
18+
with:
19+
close-stale-as-answered: false
20+
close-answered-discussion: false
1721
env:
1822
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/stale-issue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
cleanup:
10+
if: github.repository == 'aws/aws-sdk-java-v2'
1011
name: Stale issue job
1112
runs-on: ubuntu-latest
1213
permissions:

0 commit comments

Comments
 (0)