Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ on:
- "bugfix/**"
- "hotfix/**"

permissions:
contents: read
permissions: read-all


jobs:
build-and-test:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: frasermolyneux/actions/dotnet-ci@dotnet-ci/v1.1
with:
dotnet-version: |
9.0.x
10.0.x
src-folder: "src"
src-folder: "src"
22 changes: 16 additions & 6 deletions .github/workflows/codequality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ on:
- main
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
actions: read
security-events: write
permissions: read-all


jobs:
quality:
permissions:
contents: read
actions: read
security-events: write
uses: frasermolyneux/actions/.github/workflows/codequality.yml@main
with:
sonar-project-key: frasermolyneux_api-client-abstractions
Expand All @@ -31,14 +33,22 @@ jobs:
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

devops-secure-scanning:
permissions:
contents: read
actions: read
security-events: write
uses: frasermolyneux/actions/.github/workflows/devops-secure-scanning.yml@main

dependency-review:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Dependency Review
uses: actions/dependency-review-action@v4

2 changes: 2 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
paths:
- .github/workflows/copilot-setup-steps.yml

permissions: read-all

jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Dependabot Auto-Merge
on: pull_request

permissions:
contents: write
pull-requests: write

permissions: read-all


jobs:
dependabot:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
Expand All @@ -19,4 +22,4 @@ jobs:
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
8 changes: 5 additions & 3 deletions .github/workflows/pr-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
- main
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
permissions: read-all


jobs:
build-and-test:
permissions:
contents: read
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -19,4 +21,4 @@ jobs:
dotnet-version: |
9.0.x
10.0.x
src-folder: "src"
src-folder: "src"
11 changes: 7 additions & 4 deletions .github/workflows/release-publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ on:
types:
- completed

permissions:
contents: write
actions: read

permissions: read-all


jobs:
publish-nuget-packages:
permissions:
contents: write
actions: read
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: NuGet
runs-on: ubuntu-latest
Expand Down Expand Up @@ -61,4 +64,4 @@ jobs:
skipIfReleaseExists: true
artifacts: nuget-packages/**/*.nupkg
artifactErrorsFailBuild: false
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
15 changes: 10 additions & 5 deletions .github/workflows/release-version-and-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ on:
paths:
- 'src/**'

permissions:
contents: read

permissions: read-all


jobs:
calculate-version:
permissions:
contents: read
runs-on: ubuntu-latest
outputs:
semver: ${{ steps.capture_version.outputs.semver }}
Expand Down Expand Up @@ -74,6 +77,8 @@ jobs:
"tag_name=$tagName" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append

dotnet-ci:
permissions:
contents: read
needs: calculate-version
runs-on: ubuntu-latest
env:
Expand All @@ -88,13 +93,13 @@ jobs:
src-folder: "src"

tag-release:
permissions:
contents: write
needs:
- calculate-version
- dotnet-ci
if: needs.calculate-version.outputs.should_tag == 'true'
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
Expand All @@ -112,4 +117,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
git push origin ${{ needs.calculate-version.outputs.tag_name }}
git push origin ${{ needs.calculate-version.outputs.tag_name }}
Loading