Skip to content

⚙️ [Maintenance]: Harden workflow permissions and add YAML perf review harness #313

⚙️ [Maintenance]: Harden workflow permissions and add YAML perf review harness

⚙️ [Maintenance]: Harden workflow permissions and add YAML perf review harness #313

name: Process-PSModule
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
pull_request:
branches:
- main
types:
- closed
- opened
- reopened
- synchronize
- labeled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
Process-PSModule-PR:

Check failure on line 24 in .github/workflows/Process-PSModule.yml

View workflow run for this annotation

GitHub Actions / Process-PSModule

Invalid workflow file

The workflow is not valid. .github/workflows/Process-PSModule.yml (Line: 24, Col: 3): Error calling workflow 'PSModule/Process-PSModule/.github/workflows/workflow.yml@fb1bdb8fefd243292f779d2a856a38db6fe6daf4'. The workflow is requesting 'contents: write, pages: write, id-token: write', but is only allowed 'contents: read, pages: none, id-token: none'.
if: github.event_name == 'pull_request' && github.event.action != 'closed'
permissions:
contents: read
pull-requests: write
statuses: write
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@fb1bdb8fefd243292f779d2a856a38db6fe6daf4 # v6.1.13
with:
ImportantFilePatterns: |
^src/
^tests/
^README\.md$
secrets:
APIKey: ${{ secrets.APIKey }}
TestData: ${{ secrets.TestData }}
Process-PSModule-Release:
if: github.event_name != 'pull_request' || github.event.action == 'closed'
permissions:
contents: write
pull-requests: write
statuses: write
pages: write
id-token: write
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@fb1bdb8fefd243292f779d2a856a38db6fe6daf4 # v6.1.13
with:
ImportantFilePatterns: |
^src/
^tests/
^README\.md$
secrets:
APIKey: ${{ secrets.APIKey }}
TestData: ${{ secrets.TestData }}