Skip to content

Commit 947f249

Browse files
committed
update workflow files to make them zizmor compliant
1 parent 8c99025 commit 947f249

17 files changed

Lines changed: 216 additions & 141 deletions

.github/workflows/conformance-tests-bigtable-proxy.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,32 @@ on:
2626
- '.github/workflows/conformance-tests-bigtable-proxy.yaml'
2727
workflow_dispatch:
2828
name: Run Bigtable Conformance Tests With Proxy
29+
permissions:
30+
contents: read
2931
jobs:
3032
conformance:
3133
runs-on: ubuntu-latest
3234
steps:
3335
- name: Checkout code
34-
uses: actions/checkout@v7
36+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
37+
with:
38+
persist-credentials: false
3539

3640
- name: Setup PHP
37-
uses: shivammathur/setup-php@v2
41+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
3842
with:
3943
php-version: '8.1'
4044
extensions: grpc
4145

4246
- name: Checkout Bigtable conformance tests
43-
uses: actions/checkout@v7
47+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
4448
with:
4549
repository: googleapis/cloud-bigtable-clients-test
4650
ref: v0.0.3
4751
path: cloud-bigtable-clients-test
52+
persist-credentials: false
4853

49-
- uses: actions/setup-go@v7
54+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
5055
with:
5156
go-version: '>=1.20.2'
5257

.github/workflows/conformance-tests-gax-showcase.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ permissions:
88
contents: read
99
jobs:
1010
gapic-showcase:
11+
name: GAPIC Showcase Conformance Tests
1112
runs-on: ubuntu-latest
1213
env:
1314
GAPIC_SHOWCASE_VERSION: 0.42.0
1415
OS: linux
1516
ARCH: amd64
16-
name: GAPIC Showcase Conformance Tests
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v7
19+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
20+
with:
21+
persist-credentials: false
2022

2123
- name: Setup PHP
22-
uses: shivammathur/setup-php@v2
24+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2325
with:
2426
php-version: '8.2'
2527
extensions: grpc-1.83.0

.github/workflows/conformance-tests-storage-emulator.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
- 'Storage/**'
1111
- '.github/workflows/conformance-tests-storage-emulator.yaml'
1212
name: Run Storage Retry Conformance Tests With Emulator
13+
permissions:
14+
contents: read
1315
jobs:
1416
test:
1517
runs-on: 'ubuntu-24.04'
@@ -22,10 +24,12 @@ jobs:
2224

2325
steps:
2426
- name: Checkout code
25-
uses: actions/checkout@v7
27+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
28+
with:
29+
persist-credentials: false
2630

2731
- name: Setup PHP
28-
uses: shivammathur/setup-php@v2
32+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2933
with:
3034
php-version: '8.1'
3135

.github/workflows/docs.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,40 @@ on:
55
pull_request:
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
docfx:
1013
name: "Run DocFX tests"
1114
runs-on: ubuntu-latest
1215
env:
1316
PHPDOC_ENV: prod
1417
steps:
15-
- uses: actions/checkout@v7
18+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
19+
with:
20+
persist-credentials: false
1621
- name: Setup Python
17-
uses: actions/setup-python@v7
22+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
1823
with:
1924
python-version: '3.14'
2025
- run: pip install --require-hashes -r .kokoro/docs/docker/requirements.txt
2126
- name: Setup PHP
22-
uses: shivammathur/setup-php@verbose
27+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2328
with:
2429
php-version: "8.2"
2530
- name: Extract phpDocumentor
2631
id: extract
27-
uses: shrink/actions-docker-extract@v4
32+
uses: shrink/actions-docker-extract@f1ef61065b78731fe3310b4e84e511f6a927a77e # v4
2833
with:
2934
image: "phpdoc/phpdoc:3.5.3"
3035
path: "/opt/phpdoc/."
3136
- name: Symlink phpDocumentor
32-
run: ln -s $(pwd)/${{ steps.extract.outputs.destination }}/bin/phpdoc /usr/local/bin/phpdoc
37+
run: ln -s $(pwd)/${STEPS_EXTRACT_OUTPUTS_DESTINATION}/bin/phpdoc /usr/local/bin/phpdoc
38+
env:
39+
STEPS_EXTRACT_OUTPUTS_DESTINATION: ${{ steps.extract.outputs.destination }}
3340
- name: Install Dependencies
34-
uses: nick-invision/retry@v4
41+
uses: nick-invision/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4
3542
with:
3643
timeout_minutes: 10
3744
max_attempts: 3

.github/workflows/emulator-system-tests-bigtable.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
name: Bigtable
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
23+
with:
24+
persist-credentials: false
2325

2426
- run: ./.github/emulator/start-emulator.sh bigtable 522.0.0-emulators
2527

2628
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
29+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2830
with:
2931
php-version: '8.1'
3032
tools: pecl

.github/workflows/emulator-system-tests-datastore.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
name: Datastore
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
23+
with:
24+
persist-credentials: false
2325

2426
- run: ./.github/emulator/start-emulator.sh datastore 522.0.0-emulators
2527

2628
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
29+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2830
with:
2931
php-version: '8.1'
3032
tools: pecl

.github/workflows/emulator-system-tests-firestore.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
name: Firestore
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
23+
with:
24+
persist-credentials: false
2325

2426
- run: ./.github/emulator/start-emulator.sh firestore 522.0.0-emulators
2527

2628
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
29+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2830
with:
2931
php-version: '8.1'
3032
tools: pecl

.github/workflows/emulator-system-tests-pubsub.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
name: PubSub
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
23+
with:
24+
persist-credentials: false
2325

2426
- run: ./.github/emulator/start-emulator.sh pubsub
2527

2628
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
29+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2830
with:
2931
php-version: '8.1'
3032
tools: pecl

.github/workflows/emulator-system-tests-spanner.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ jobs:
2525

2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v7
28+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
29+
with:
30+
persist-credentials: false
2931

3032
- name: Create Spanner instance
31-
uses: google-github-actions/setup-gcloud@v3
33+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3
3234
with:
3335
version: '516.0.0'
3436
- run: gcloud info
@@ -39,7 +41,7 @@ jobs:
3941
- run: gcloud spanner instances create google-cloud-php-system-tests --config=emulator-config --description="Test Instance" --nodes=1
4042

4143
- name: Setup PHP
42-
uses: shivammathur/setup-php@v2
44+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
4345
with:
4446
php-version: '8.4'
4547
ini-values: grpc.enable_fork_support=1

.github/workflows/lint.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
name: PHP Style Check
1414
steps:
15-
- uses: actions/checkout@v7
15+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
16+
with:
17+
persist-credentials: false
1618
- name: Setup PHP
17-
uses: shivammathur/setup-php@v2
19+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
1820
with:
1921
php-version: '8.1'
2022
- name: Install Dependencies
@@ -24,9 +26,9 @@ jobs:
2426

2527
style_csfixer:
2628
name: PHP CS Fixer
27-
uses: GoogleCloudPlatform/php-tools/.github/workflows/code-standards.yml@main
29+
uses: GoogleCloudPlatform/php-tools/.github/workflows/code-standards.yml@8d707553d2c90c3b614941950814dcc10c19ce47 # main
2830
with:
29-
config: GoogleCloudPlatform/php-tools/.php-cs-fixer.default.php@main
31+
config: GoogleCloudPlatform/php-tools/.php-cs-fixer.default.php@8d707553d2c90c3b614941950814dcc10c19ce47
3032
exclude-patterns: |
3133
[
3234
"#.*/src/V[0-9]+#",
@@ -52,9 +54,11 @@ jobs:
5254
runs-on: ubuntu-latest
5355
name: PHPStan Static Analysis
5456
steps:
55-
- uses: actions/checkout@v7
57+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
58+
with:
59+
persist-credentials: false
5660
- name: Install PHP
57-
uses: shivammathur/setup-php@v2
61+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
5862
with:
5963
php-version: '8.2'
6064
- name: "Install dependencies"

0 commit comments

Comments
 (0)