Skip to content
Open
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
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: All builds
on: [push, pull_request]

permissions:
contents: read
packages: read

Comment on lines +4 to +7
Copy link
Collaborator

Choose a reason for hiding this comment

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

This does change the permissions of the workflow. According to the docs any permission not set in this dict will now be set to none, which will be different to the default.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this really changes the permissions from the default.

This document says that the default permissions are contents: read, packages: read ... if we are in restricted mode (but I don't know if that is the case).

But I'm not sure we even need both.

jobs:
build:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Create release from new tag

# setting default permissions to "none"
# because permissions are set at the job level
permissions: {}

# this flow will be run only when new tags are pushed that match our pattern
on:
push:
Expand Down
Loading