File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ permissions:
77 contents : read
88
99concurrency :
10- group : ${{ github.ref }}
10+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github. ref }}
1111 cancel-in-progress : true
1212
1313jobs :
3131 WP_ADMIN_PASSWORD : admin
3232 WP_ADMIN_EMAIL : admin@test.test
3333
34+ if : |
35+ github.event_name == 'push' ||
36+ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true)
37+
3438 runs-on : ${{ matrix.os }}
3539
3640 name : PHP ${{ matrix.php-version }} on ${{ matrix.os }}
7175 yarn lint
7276
7377 - name : Install WP CLI
78+ # Security: 1. Ensure wp-cli integrity via checksum.
7479 run : |
75- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
80+ WPCLI_VERSION=2.12.0
81+ curl -fsSL -o wp-cli.phar "https://github.com/wp-cli/wp-cli/releases/download/v${WPCLI_VERSION}/wp-cli-${WPCLI_VERSION}.phar"
82+ curl -fsSL -o wp-cli.phar.sha256 "https://github.com/wp-cli/wp-cli/releases/download/v${WPCLI_VERSION}/wp-cli-${WPCLI_VERSION}.phar.sha256"
83+ echo "$(cat wp-cli.phar.sha256) wp-cli.phar" | sha256sum -c -
7684 chmod +x wp-cli.phar
7785 mkdir -p wp-cli
7886 sudo mv wp-cli.phar wp-cli/wp
Original file line number Diff line number Diff line change 33 push :
44 branches :
55 - trunk
6+ permissions :
7+ actions : read
8+ contents : read
69jobs :
710 trunk :
811 name : Push to trunk
Original file line number Diff line number Diff line change @@ -2,12 +2,18 @@ name: Deploy to WordPress.org
22on :
33 release :
44 types : [published]
5+ permissions :
6+ actions : read
7+ contents : write
58jobs :
69 tag :
710 name : New release
811
912 runs-on : ubuntu-latest
1013
14+ # Security: 1. Check if user is authorized.
15+ if : contains(fromJson('["kagg-design", "e271828-"]'), github.actor)
16+
1117 env :
1218 SLUG : " hcaptcha-for-forms-and-more"
1319
You can’t perform that action at this time.
0 commit comments