Skip to content

Commit da84c64

Browse files
authored
Harden GitHub workflows (#166)
1 parent 10998ae commit da84c64

3 files changed

Lines changed: 40 additions & 4 deletions

File tree

.github/dependabot.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,25 @@ updates:
44
- package-ecosystem: "github-actions"
55
directory: "/"
66
schedule:
7-
interval: "daily"
8-
# Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581
9-
open-pull-requests-limit: 0
7+
interval: "weekly"
8+
cooldown:
9+
default-days: 7
10+
groups:
11+
github-actions:
12+
patterns:
13+
- "*"
14+
ignore:
15+
- dependency-name: "yiisoft/*"
1016

1117
# Maintain dependencies for Composer
1218
- package-ecosystem: "composer"
1319
directory: "/"
1420
schedule:
1521
interval: "daily"
22+
cooldown:
23+
default-days: 7
24+
groups:
25+
composer-dependencies:
26+
patterns:
27+
- "*"
1628
versioning-strategy: increase-if-necessary

.github/workflows/rector-cs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ on:
1111
- '.php-cs-fixer.dist.php'
1212

1313
permissions:
14-
contents: write
14+
contents: read
1515

1616
concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
1818
cancel-in-progress: true
1919

2020
jobs:
2121
rector:
22+
permissions:
23+
contents: write # Required to commit automated Rector and CS fixes.
2224
uses: yiisoft/actions/.github/workflows/rector-cs.yml@master
2325
with:
2426
php: '8.1'

.github/workflows/zizmor.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: GitHub Actions Security Analysis with zizmor 🌈
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
paths:
9+
- '.github/**.yml'
10+
- '.github/**.yaml'
11+
pull_request:
12+
paths:
13+
- '.github/**.yml'
14+
- '.github/**.yaml'
15+
16+
permissions:
17+
actions: read # Required by zizmor when reading workflow metadata through the API.
18+
contents: read # Required to read workflow files.
19+
20+
jobs:
21+
zizmor:
22+
uses: yiisoft/actions/.github/workflows/zizmor.yml@master

0 commit comments

Comments
 (0)