workflows/*: add security hardening (#8518)
This commit is contained in:
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -2,6 +2,9 @@ name: CI
|
|||||||
|
|
||||||
on: ['push', 'pull_request']
|
on: ['push', 'pull_request']
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
4
.github/workflows/mirror.yml
vendored
4
.github/workflows/mirror.yml
vendored
@@ -4,8 +4,12 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches: ['main']
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
mirror:
|
mirror:
|
||||||
|
permissions:
|
||||||
|
contents: write # to update branch
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
5
.github/workflows/stale.yml
vendored
5
.github/workflows/stale.yml
vendored
@@ -4,8 +4,13 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
permissions:
|
||||||
|
issues: write # to close stale issues (actions/stale)
|
||||||
|
pull-requests: write # to close stale PRs (actions/stale)
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
Reference in New Issue
Block a user