Merge pull request #260 from crazy-max/gha-perms

ci: set contents read as default workflow permissions
This commit is contained in:
CrazyMax 2025-03-02 16:24:31 +01:00 committed by GitHub
commit 768043258e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 30 additions and 1 deletions

View File

@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on:
schedule:
- cron: '0 10 * * *'

View File

@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on:
push:
branches:
@ -19,6 +23,11 @@ on:
jobs:
labeler:
runs-on: ubuntu-latest
permissions:
# same as global permissions
contents: read
# required to update labels
issues: write
steps:
-
name: Checkout

View File

@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on:
push:
branches:

View File

@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on:
workflow_dispatch:
schedule:
@ -27,6 +31,10 @@ jobs:
open-pr:
runs-on: ubuntu-22.04
if: github.event_name != 'pull_request'
permissions:
# required to create PR
contents: write
pull-requests: write
needs:
- generate
steps:

View File

@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on:
push:
branches:

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020-2024 CrazyMax
Copyright (c) 2020-2025 CrazyMax
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal