Skip to content

Commit b6876db

Browse files
authored
Update GitHub Actions to work in private GitHub repo (#25197)
1 parent 94d0361 commit b6876db

File tree

10 files changed

+17
-85
lines changed

10 files changed

+17
-85
lines changed

.github/workflows/AssignPrs.yml

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

88
jobs:
99
run:
10+
if: github.repository_owner == 'PowerShell'
1011
runs-on: ubuntu-latest
1112
permissions:
1213
issues: write

.github/workflows/backport.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

.github/workflows/createReminders.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ permissions:
99

1010
jobs:
1111
reminder:
12+
if: github.repository_owner == 'PowerShell'
13+
1214
permissions:
1315
issues: write # for agrc/create-reminder-action to set reminders on issues
1416
pull-requests: write # for agrc/create-reminder-action to set reminders on PRs

.github/workflows/labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
verify-labels:
16-
if: github.repository_owner == 'PowerShell'
16+
if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell'
1717
runs-on: ubuntu-latest
1818

1919
steps:

.github/workflows/linux-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ env:
3737
system_debug: 'false'
3838
jobs:
3939
changes:
40+
if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell'
4041
name: Change Detection
4142
runs-on: ubuntu-latest
4243
# Required permissions
@@ -50,7 +51,7 @@ jobs:
5051
uses: actions/checkout@v4.1.0
5152

5253
# For pull requests it's not necessary to checkout the code
53-
- uses: dorny/paths-filter@v3
54+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0
5455
id: filter
5556
with:
5657
list-files: json
@@ -232,7 +233,7 @@ jobs:
232233
- linux_test_unelevated_others
233234
- analyze
234235
if: always()
235-
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@master
236+
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0
236237
with:
237238
needs_context: ${{ toJson(needs) }}
238239
# TODO: Enable this when we have a Linux packaging workflow

.github/workflows/macos-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
changes:
3939
name: Change Detection
4040
runs-on: ubuntu-latest
41+
if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell'
4142
# Required permissions
4243
permissions:
4344
pull-requests: read
@@ -49,7 +50,7 @@ jobs:
4950
uses: actions/checkout@v4.1.0
5051

5152
# For pull requests it's not necessary to checkout the code
52-
- uses: dorny/paths-filter@v3
53+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0
5354
id: filter
5455
with:
5556
list-files: json
@@ -186,6 +187,6 @@ jobs:
186187
- macos_test_unelevated_ci
187188
- macos_test_unelevated_others
188189
if: always()
189-
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@master
190+
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0
190191
with:
191192
needs_context: ${{ toJson(needs) }}

.github/workflows/markdownLink.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ permissions:
1010
jobs:
1111
markdown-link-check:
1212
runs-on: ubuntu-latest
13+
if: github.repository_owner == 'PowerShell'
14+
1315
steps:
1416
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1517
- uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368 # v1

.github/workflows/processReminders.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
jobs:
1212
reminder:
13+
if: github.repository_owner == 'PowerShell'
1314
permissions:
1415
issues: write # for agrc/reminder-action to set reminders on issues
1516
pull-requests: write # for agrc/reminder-action to set reminders on PRs

.github/workflows/scorecards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ permissions: read-all
2020
jobs:
2121
analysis:
2222
name: Scorecard analysis
23+
if: github.repository_owner == 'PowerShell'
2324
runs-on: ubuntu-latest
2425
permissions:
2526
# Needed to upload the results to code-scanning dashboard.

.github/workflows/windows-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
changes:
4040
name: Change Detection
4141
runs-on: ubuntu-latest
42+
if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell'
4243
# Required permissions
4344
permissions:
4445
pull-requests: read
@@ -50,7 +51,7 @@ jobs:
5051
uses: actions/checkout@v4.1.0
5152

5253
# For pull requests it's not necessary to checkout the code
53-
- uses: dorny/paths-filter@v3
54+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.2.0
5455
id: filter
5556
with:
5657
list-files: json
@@ -170,6 +171,6 @@ jobs:
170171
- windows_test_unelevated_ci
171172
- windows_test_unelevated_others
172173
if: always()
173-
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@master
174+
uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@v1.0.0
174175
with:
175176
needs_context: ${{ toJson(needs) }}

0 commit comments

Comments
 (0)