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

Specify permissions in GH Action workflows #1679

Merged
merged 3 commits into from
Feb 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
10 changes: 10 additions & 0 deletions .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
pull_request:
types: [opened, synchronize, reopened, closed]

permissions: read-all

env:
GH_BOT_NAME: 'github-actions[bot]'
GH_BOT_EMAIL: 'github-actions[bot]@users.noreply.github.com'
Expand All @@ -25,6 +27,14 @@ jobs:

runs-on: ubuntu-20.04

permissions:
# Needed to cancel any previous runs that are not completed for a given workflow
actions: write
# Needed to deploy static files to GitHub Pages
contents: write
# Needed to add a comment to a pull request's issue
pull-requests: write

env:
python-ver: '3.9'
CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- master
pull_request:

permissions: read-all

env:
PACKAGE_NAME: dpnp
MODULE_NAME: dpnp
Expand Down Expand Up @@ -58,6 +60,10 @@ jobs:
python: ['3.9', '3.10', '3.11']
os: [ubuntu-20.04, windows-latest]

permissions:
# Needed to cancel any previous runs that are not completed for a given workflow
actions: write

runs-on: ${{ matrix.os }}

defaults:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/generate_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ on:
push:
branches: [master]

permissions: read-all

jobs:
generate-coverage:
name: Generate coverage and push to Coveralls.io
runs-on: ubuntu-20.04

permissions:
# Needed to cancel any previous runs that are not completed for a given workflow
actions: write

defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches: [master]

permissions: read-all

jobs:
pre-commit:
runs-on: ubuntu-latest
Expand Down
Loading