Skip to content

Commit d0ac080

Browse files
authored
Merge pull request #179 from WordPress/workflow-updates
GitHub Actions workflow updates
2 parents 7bfc49f + f7ab83b commit d0ac080

4 files changed

Lines changed: 24 additions & 6 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: 'Copilot Setup Steps'
22

3+
# Disable permissions for all available scopes by default.
4+
# Any needed permissions should be configured at the job level.
5+
permissions: {}
6+
37
# Automatically run the setup steps when they are changed to allow for easy validation, and
48
# allow manual testing through the repository's "Actions" tab
59
on:
@@ -15,9 +19,10 @@ jobs:
1519
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
1620
copilot-setup-steps:
1721
runs-on: ubuntu-latest
22+
timeout-minutes: 10
1823

1924
permissions:
20-
contents: read
25+
contents: read # Required to clone the repo.
2126

2227
steps:
2328
- name: Checkout repository

.github/workflows/props-bot.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ jobs:
5050
name: Generate a list of props
5151
runs-on: ubuntu-24.04
5252
permissions:
53-
# The action needs permission `write` permission for PRs in order to add a comment.
54-
pull-requests: write
55-
contents: read
53+
pull-requests: write # Required by props-bot-action to comment on the PR.
54+
contents: read # Required by props-bot-action to read repository contents.
5655
timeout-minutes: 20
5756
# The job will run when pull requests are open, ready for review and:
5857
#

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Upload Package on Release
22

3+
# Disable permissions for all available scopes by default.
4+
# Any needed permissions should be configured at the job level.
5+
permissions: {}
6+
37
# Cancels all previous workflow runs for pull requests that have not completed.
48
concurrency:
59
# The concurrency group contains the workflow name and the branch name for pull requests
@@ -15,6 +19,9 @@ jobs:
1519
tag:
1620
name: Upload New Release
1721
runs-on: ubuntu-24.04
22+
timeout-minutes: 10
23+
permissions:
24+
contents: write # Required to clone the repo and to upload the release asset.
1825

1926
steps:
2027
- name: Checkout repository

.github/workflows/test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Test
22

3+
# Disable permissions for all available scopes by default.
4+
# Any needed permissions should be configured at the job level.
5+
permissions: {}
6+
37
on:
48
workflow_dispatch:
59
push:
@@ -33,7 +37,7 @@ jobs:
3337
name: Run PHPCS coding standards checks
3438
runs-on: ubuntu-24.04
3539
permissions:
36-
contents: read
40+
contents: read # Required to clone the repo.
3741
timeout-minutes: 20
3842

3943
steps:
@@ -92,7 +96,7 @@ jobs:
9296
name: Run PHP static analysis
9397
runs-on: ubuntu-24.04
9498
permissions:
95-
contents: read
99+
contents: read # Required to clone the repo.
96100
timeout-minutes: 20
97101

98102
steps:
@@ -171,6 +175,9 @@ jobs:
171175
phpunit:
172176
name: Test PHP ${{ matrix.php }} WP ${{ matrix.wp }}${{ matrix.coverage && ' with coverage' || '' }}
173177
runs-on: ubuntu-24.04
178+
permissions:
179+
contents: read # Required to clone the repo.
180+
timeout-minutes: 20
174181
strategy:
175182
fail-fast: false
176183
matrix:

0 commit comments

Comments
 (0)