Skip to content

Commit 3b6ff43

Browse files
committed
Merge branch 'master' into v4.21.0
2 parents f9f7dd6 + 0c75705 commit 3b6ff43

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77
contents: read
88

99
concurrency:
10-
group: ${{ github.ref }}
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1111
cancel-in-progress: true
1212

1313
jobs:
@@ -31,6 +31,10 @@ jobs:
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 }}
@@ -71,8 +75,12 @@ jobs:
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

.github/workflows/deploy-readme-assets-to-wp-org.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches:
55
- trunk
6+
permissions:
7+
actions: read
8+
contents: read
69
jobs:
710
trunk:
811
name: Push to trunk

.github/workflows/deploy-to-wp-org.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@ name: Deploy to WordPress.org
22
on:
33
release:
44
types: [published]
5+
permissions:
6+
actions: read
7+
contents: write
58
jobs:
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

0 commit comments

Comments
 (0)