Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set Minimum GITHUB_TOKEN permissions to github workflow #5123

Merged
merged 1 commit into from
Jul 3, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/dockerhub-latest-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
branches:
- master
permissions:
contents: read
jobs:
publish-image-to-dockerhub:
name: publish to DockerHub
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dockerhub-released-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
release:
types:
- published
permissions:
contents: read
jobs:
publish-chart-to-dockerhub:
name: publish to DockerHub
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dockerhub-released-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
release:
types:
- published
permissions:
contents: read
jobs:
publish-image-to-dockerhub:
name: publish to DockerHub
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ on:
types:
- published
name: Build Release
permissions:
contents: read
jobs:
release-assests:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
name: release kubectl-karmada
runs-on: ubuntu-22.04
strategy:
Expand Down Expand Up @@ -41,6 +45,8 @@ jobs:
_output/release/${{ matrix.target }}-${{ matrix.os }}-${{ matrix.arch }}.tgz
_output/release/${{ matrix.target }}-${{ matrix.os }}-${{ matrix.arch }}.tgz.sha256
release-crds-assests:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following the doc,set the correct permission. https://github.com/softprops/action-gh-release?tab=readme-ov-file#permissions
/lgtm

name: release crds
runs-on: ubuntu-22.04
steps:
Expand All @@ -61,6 +67,8 @@ jobs:
files: |
crds.tar.gz
release-charts:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
name: Release charts
runs-on: ubuntu-22.04
steps:
Expand All @@ -79,6 +87,8 @@ jobs:
_output/charts/karmada-operator-chart-${{ github.ref_name }}.tgz
_output/charts/karmada-operator-chart-${{ github.ref_name }}.tgz.sha256
sbom-assests:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
name: Release sbom
runs-on: ubuntu-22.04
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/swr-latest-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
branches:
- master
permissions:
contents: read
jobs:
publish-image:
name: publish images
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/swr-released-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
release:
types:
- published
permissions:
contents: read
jobs:
release-image:
name: release images
Expand Down