mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 14:10:56 -05:00
4471e9f322
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
35 lines
963 B
YAML
35 lines
963 B
YAML
---
|
|
####################################
|
|
####################################
|
|
## Draft releases on Push to main ##
|
|
####################################
|
|
####################################
|
|
name: Release Drafter
|
|
|
|
###########################
|
|
# Start on push to main #
|
|
###########################
|
|
on:
|
|
push:
|
|
# branches to consider in the event; optional, defaults to all
|
|
branches:
|
|
- main
|
|
|
|
#################
|
|
# Start the job #
|
|
#################
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
update_release_draft:
|
|
permissions:
|
|
contents: write # for release-drafter/release-drafter to create a github release
|
|
pull-requests: write # for release-drafter/release-drafter to add label to PR
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
# Drafts your next Release notes as Pull Requests are merged into "master"
|
|
- uses: release-drafter/release-drafter@v5
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|