Skip to content

Commit

Permalink
chore: update github workflows with proper permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
vhatsura committed Aug 7, 2024
1 parent c537033 commit 6953ed6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/continuous.integration.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
---
name: Continuous Integration Check

on:
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened, ready_for_review ]
workflow_dispatch:

jobs:
permissions: read-all

env:
GH_PKG_USER: ${{ secrets.GH_PKG_USER }}
GH_PKG_TOKEN: ${{ secrets.GH_PKG_TOKEN }}

jobs:
ci:
name: Continuous Integration Check
runs-on: ubuntu-latest

env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
name: Lint Code Base

on:
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened, ready_for_review ]
branches: [main]

jobs:
lint:
permissions:
contents: read
statuses: write

jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint Code Base
uses: super-linter/super-linter@v6
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_EDITORCONFIG: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 5 additions & 2 deletions .github/workflows/nuget.publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Publish NuGet package

on:
Expand All @@ -7,6 +6,10 @@ on:
push:
branches: [ main ]

permissions:
contents: read
pull-requests: read

jobs:

publish:
Expand All @@ -16,7 +19,7 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down

0 comments on commit 6953ed6

Please sign in to comment.