Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions: read-all
# Limit GITHUB_TOKEN to read-only access for the repository contents.
permissions:
contents: read

jobs:
pre-compile-checks:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/community-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ on:
schedule:
- cron: '00 00,08,16 * * *'

# Same permission as stale Github action
# The community review script needs write permissions to label PRs.
permissions:
# Required to add/remove labels (indirectly via issues API for PRs).
issues: write
# Required to add/remove labels on PRs via the GitHub API.
pull-requests: write
# Required for the script to manage its execution state.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you explain why it is necessary to manage the execution state

actions: write
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Need double check if community-review.sh requires action: write permission. From my understanding, only read-only PR query and issue API permissions are needed

jobs:
label:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ on:
- release-1.1
- release-1.0

# Default permission grants write access; restrict to read-only for repository contents.
permissions:
contents: read

jobs:
build-documentation:
if: github.repository == 'apache/flink'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
- cron: '0 0 * * *' # Deploy every day
workflow_dispatch:

# Default permission grants write access; restrict to read-only for repository contents.
permissions:
contents: read

jobs:
build-documentation:
if: github.repository == 'apache/flink'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nightly-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ on:
schedule:
- cron: '0 2 * * *'

# No workflow-level access needed; each job requests only what it requires.
permissions: {}

jobs:
Trigger:
if: github.repository == 'apache/flink'
permissions:
# Required for github-script action to call createWorkflowDispatch API.
actions: write
strategy:
matrix:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ name: "Nightly (beta)"
on:
workflow_dispatch:

permissions: read-all
# Limit GITHUB_TOKEN to read-only access for the repository contents.
permissions:
contents: read

jobs:
pre-compile-checks:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ on:
default: 20
type: number

# The stale action needs write permissions to label and close stale PRs.
permissions:
# Required for actions/stale to add/remove labels on issues.
issues: write
# Required for actions/stale to add/remove labels on PRs and post comments.
pull-requests: write
# Required for actions/stale to manage its own operation state.
actions: write

jobs:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/template.flink-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ on:
s3_secret_key:
required: false

permissions: read-all
# Limit GITHUB_TOKEN to read-only access for the repository contents.
permissions:
contents: read

# Running logic within a container comes with challenges around file permissions (e.g. when trying
# to generate the hash for a certain set of files; see https://github.com/actions/cache/issues/753):
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/template.pre-compile-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ on:
default: 17
type: number

permissions: read-all
# Limit GITHUB_TOKEN to read-only access for the repository contents.
permissions:
contents: read

# This workflow should only contain steps that do not require the compilation of Flink (and therefore, are
# independent of the used JDK)
Expand Down