Skip to content

Commit

Permalink
[chore] minor cleanup in workflows (#11971)
Browse files Browse the repository at this point in the history
shorten

```
permissions:
  contents: all
```

to

```
permissions: read-all
```

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
codeboten authored Dec 23, 2024
1 parent 52802bd commit 14f37f1
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 35 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/api-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ on:
branches:
- main

permissions:
contents: read
permissions: read-all

jobs:
Check-Compatibility:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ env:
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2

permissions:
contents: read
permissions: read-all

# Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616
concurrency:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read
permissions: read-all

jobs:
windows-unittest:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
types: [checks_requested]
pull_request:

permissions:
contents: read
permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/builder-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ on:

# manual execution
workflow_dispatch:

merge_group:
types: [checks_requested]

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read
permissions: read-all

jobs:
integration-test:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read
permissions: read-all

jobs:
changelog:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/check-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read
permissions: read-all

jobs:
changedfiles:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read
permissions: read-all

jobs:
CodeQL-Build:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/contrib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read
permissions: read-all

jobs:
contrib-tests-matrix:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/generate-semantic-conventions-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
- cron: "30 1 * * *"
workflow_dispatch:

permissions:
contents: read
permissions: read-all

jobs:
check-versions:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
push:
branches: [main]

permissions:
contents: read
permissions: read-all

jobs:
runperf:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: Shellcheck lint
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
merge_group:
types: [checks_requested]

permissions:
contents: read
permissions: read-all

jobs:
shellcheck:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/stale-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ on:
schedule:
- cron: "12 3 * * *" # arbitrary time not to DDOS GitHub

permissions:
contents: read
permissions: read-all

jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This PR was marked stale due to lack of activity. It will be closed in 14 days.'
close-pr-message: 'Closed as inactive. Feel free to reopen if this PR is still being worked on.'
stale-pr-message: "This PR was marked stale due to lack of activity. It will be closed in 14 days."
close-pr-message: "Closed as inactive. Feel free to reopen if this PR is still being worked on."
days-before-pr-stale: 14
days-before-issue-stale: 730
days-before-pr-close: 14
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tidy-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
branches:
- main

permissions:
contents: read
permissions: read-all

jobs:
setup-environment:
Expand Down

0 comments on commit 14f37f1

Please sign in to comment.