Skip to content

Apache DataFusion SQL Query Engine

Fix GH action permissions in `rust.yml` and `docs.yaml` workflows (#21884)

Jeffrey Vo66980e26df75
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
index 7713d5dd31..73698c06a4 100644
--- a/.github/workflows/docs.yaml
+++ b/.github/workflows/docs.yaml
@@ -27,6 +27,8 @@ on:
name: Deploy DataFusion site
jobs:
+ permissions:
+ contents: write
build-docs:
name: Build docs
runs-on: ubuntu-latest
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index b77a8617eb..3f6462f0f0 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -42,6 +42,9 @@ on:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
# Check crate compiles and base cargo check passes
linux-build-lib:
@@ -740,7 +743,7 @@ jobs:
with:
submodules: true
fetch-depth: 1
-
+
- name: Mark repository as safe for git
# Required for git commands inside container (avoids "dubious ownership" error)
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"