Skip to content

Commit

Permalink
Configure Github workflow and job level permissions (#1602)
Browse files Browse the repository at this point in the history
* Configure Github workflow and job level permissions

* force CI run

* Revert "force CI run"

This reverts commit ab70476.
  • Loading branch information
levan-m authored Nov 8, 2024
1 parent b6f5372 commit 4e19b91
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
paths:
- "charts/**"

# Permission forced by repo-level setting; only elevate on job-level
permissions:
contents: read
# packages: read

jobs:
changed:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/go-test-private-action-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
paths:
- 'test/private-action-runner/**'
- 'charts/private-action-runner/**'

# Permission forced by repo-level setting; only elevate on job-level
permissions:
contents: read
# packages: read

env:
GO111MODULE: "on"
PROJECTNAME: "helm-charts"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
paths:
- 'test/datadog-operator/**'
- 'charts/datadog-operator/**'

# Permission forced by repo-level setting; only elevate on job-level
permissions:
contents: read
# packages: read

env:
GO111MODULE: "on"
PROJECTNAME: "helm-charts"
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ on:
branches:
- main

# Permission forced by repo-level setting; only elevate on job-level
permissions:
contents: read
# packages: read

jobs:
label:
name: Add label for PRs
runs-on: ubuntu-latest
permissions:
pull-requests: write
timeout-minutes: 5
steps:
- uses: actions/labeler@v5
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ on:
paths:
- 'charts/**'

permissions: {}

jobs:
release:
runs-on: ubuntu-latest
permissions:
# https://github.com/helm/chart-releaser-action
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit 4e19b91

Please sign in to comment.