Skip to content

Commit 34cdc16

Browse files
desrosjjohnbillionmasteradhoc
authored
Merge pull request #892 from WordPress/workflow-updates
GitHub Actions workflow updates Co-authored-by: johnbillion <johnbillion@git.wordpress.org> Co-authored-by: masteradhoc <masteradhoc@git.wordpress.org> Co-authored-by: desrosj <desrosj@git.wordpress.org>
2 parents 3729d84 + 4627ba3 commit 34cdc16

3 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@ on:
88
# For readme and asset updates.
99
- master
1010

11+
# Disable permissions for all available scopes by default.
12+
# Any needed permissions should be configured at the job level.
13+
permissions: {}
14+
1115
jobs:
1216

1317
deploy:
1418
name: Deploy to WordPress.org
1519
runs-on: ubuntu-24.04
20+
timeout-minutes: 10
21+
permissions:
22+
contents: write # Required to upload assets to the GitHub release.
1623
steps:
1724
- name: Checkout
1825
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0

.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 to post the props comment on the pull request.
54+
issues: write # Required to remove the props-bot label.
5655
timeout-minutes: 20
5756
# The job will run when pull requests are open, ready for review and:
5857
#

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
1010
cancel-in-progress: true
1111

12+
# Disable permissions for all available scopes by default.
13+
# Any needed permissions should be configured at the job level.
14+
permissions: {}
15+
1216
jobs:
1317
lint-js-css:
1418
name: Lint JS & CSS
1519
runs-on: ubuntu-24.04
20+
timeout-minutes: 20
21+
permissions:
22+
contents: read # Required to clone the repo.
1623
steps:
1724
- name: Checkout
1825
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
@@ -35,6 +42,9 @@ jobs:
3542
lint-php-and-compatibility:
3643
name: Lint PHP & PHP Compatibility checks.
3744
runs-on: ubuntu-24.04
45+
timeout-minutes: 20
46+
permissions:
47+
contents: read # Required to clone the repo.
3848
steps:
3949
- name: Checkout
4050
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
@@ -65,6 +75,9 @@ jobs:
6575
test-php:
6676
name: Test PHP ${{ matrix.php }} ${{ matrix.wp != '' && format( ' (WP {0}) ', matrix.wp ) || '' }}
6777
runs-on: ubuntu-24.04
78+
timeout-minutes: 20
79+
permissions:
80+
contents: read # Required to clone the repo.
6881
strategy:
6982
matrix:
7083
php:
@@ -144,6 +157,9 @@ jobs:
144157
build:
145158
name: Build
146159
runs-on: ubuntu-24.04
160+
timeout-minutes: 20
161+
permissions:
162+
contents: read # Required to clone the repo.
147163
steps:
148164
- name: Checkout
149165
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0

0 commit comments

Comments
 (0)