Skip to content

Commit 66980e2

Browse files
authored
Fix GH action permissions in rust.yml and docs.yaml workflows (#21884)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> Followup to #21838 for the rest of the workflows ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> ## Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. -->
1 parent 3aefba7 commit 66980e2

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/docs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ on:
2727
name: Deploy DataFusion site
2828

2929
jobs:
30+
permissions:
31+
contents: write
3032
build-docs:
3133
name: Build docs
3234
runs-on: ubuntu-latest

.github/workflows/rust.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ on:
4242
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
4343
workflow_dispatch:
4444

45+
permissions:
46+
contents: read
47+
4548
jobs:
4649
# Check crate compiles and base cargo check passes
4750
linux-build-lib:
@@ -740,7 +743,7 @@ jobs:
740743
with:
741744
submodules: true
742745
fetch-depth: 1
743-
746+
744747
- name: Mark repository as safe for git
745748
# Required for git commands inside container (avoids "dubious ownership" error)
746749
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

0 commit comments

Comments
 (0)