Skip to content

Commit 6ba46cd

Browse files
committed
Add GitHub workflow permissions
- Add permissions to GitHub workflows - Rename Tests.yml to Pester.yml - Update Test documentation
1 parent 4ba48a6 commit 6ba46cd

File tree

6 files changed

+13
-3
lines changed

6 files changed

+13
-3
lines changed

.github/workflows/PSScriptAnalyzer.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on: [push, pull_request]
33
jobs:
44
lint:
55
name: Run PSScriptAnalyzer
6+
permissions:
7+
contents: read
8+
pull-requests: write
69
runs-on: ubuntu-latest
710
steps:
811
- uses: actions/checkout@v4
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Pester Tests
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [main, dev, master]

.github/workflows/Release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Publish PowerShell Module
2-
2+
permissions:
3+
contents: read
34
on:
45
release:
56
types: [published]

.github/workflows/Stale.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55

66
jobs:
77
stale:
8+
permissions:
9+
issues: write
10+
pull-requests: write
811
runs-on: ubuntu-latest
912
steps:
1013
- uses: actions/stale@v9

TESTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Tests code quality and best practices:
137137

138138
### Automated Testing Workflow
139139

140-
The module includes a dedicated GitHub Actions workflow (`.github/workflows/Tests.yml`) that:
140+
The module includes a dedicated GitHub Actions workflow (`.github/workflows/Pester.yml`) that:
141141

142142
1. **Runs on Multiple Events**
143143
- Push to main/dev/master branches

Tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Invoke-Pester -Configuration $PesterConfiguration
9292

9393
## Continuous Integration
9494

95-
The tests are automatically run on every push and pull request via GitHub Actions. See `.github/workflows/Tests.yml` for the CI/CD pipeline configuration.
95+
The tests are automatically run on every push and pull request via GitHub Actions. See `.github/workflows/Pester.yml` for the CI/CD pipeline configuration.
9696

9797
### CI/CD Pipeline Features
9898
- **Windows Testing**: Tests run on Windows Server (latest)

0 commit comments

Comments
 (0)