Skip to content

Commit

Permalink
Add minimum GitHub token permissions for workflows (#7541)
Browse files Browse the repository at this point in the history
* Update gradle_release.yml to contents write

* Update gradle_snapshot.yml to contents write
  • Loading branch information
joycebrum committed Mar 14, 2023
1 parent ed674be commit bfe4aba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/gradle_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ on:
tags:
- 'v3.*.*'

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: write
env:
CI_BUILD_NUMBER: ${{ github.run_number }}
steps:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/gradle_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ name: Snapshot
on:
push:
branches: [ '3.x' ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
if: github.repository == 'ReactiveX/RxJava'
permissions:
contents: write
env:
# ------------------------------------------------------------------------------
CI_BUILD_NUMBER: ${{ github.run_number }}
Expand Down

0 comments on commit bfe4aba

Please sign in to comment.