Skip to content

Commit

Permalink
Improvements to workflows and security workflow example
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefanni Brasil committed Jul 12, 2024
1 parent 1779e8a commit 36974d6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/dynamic-security-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: update-security

on:
push:
paths:
- SECURITY.md
branches:
- main
workflow_dispatch:

jobs:
update-security:
permissions:
contents: write
pull-requests: write
pages: write
uses: thoughtbot/templates/.github/workflows/dynamic-security.yaml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions .github/workflows/dynamic-security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
required: true

jobs:
update_security-file:
update_security:
name: "Update Security file"
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -50,4 +50,3 @@ jobs:
This PR was automatically generated to update the dynamic section in the SECURITY file.
Whenever SECURITY is updated, this workflow is triggered to dynamically render the snippet
used in the SECURITY file.
1 change: 1 addition & 0 deletions .github/workflows/trigger-dynamic-readme-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- thoughtbot/Curry
- thoughtbot/croutons
- thoughtbot/parity
- thoughtbot/testing-reusable-workflow
steps:
- name: Trigger Dynamic READMEs to be updated with templates
uses: benc-uk/workflow-dispatch@v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/trigger-dynamic-security-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ jobs:
- thoughtbot/Curry
- thoughtbot/croutons
- thoughtbot/parity
- thoughtbot/testing-reusable-workflow
steps:
- name: Trigger Dynamic SECURITYs to be updated with templates
uses: benc-uk/workflow-dispatch@v1
with:
workflow: update_security-file
workflow: update-security
repo: ${{ matrix.repository }}
token: ${{ secrets.PAT_TOKEN }}
ref: "main"
2 changes: 1 addition & 1 deletion templates/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ your reasons so that we can have a better understanding of your situation.
For security inquiries or vulnerability reports, visit
<https://thoughtbot.com/security>.

If you have any suggestions to improve this policy, please send an email to the email address at <https://thoughtbot.com/security>.
If you have any suggestions to improve this policy, visit <https://thoughtbot.com/security>.

0 comments on commit 36974d6

Please sign in to comment.