Skip to content

Commit

Permalink
Improve workflow files
Browse files Browse the repository at this point in the history
- Per OpenSSF, permissions should be read at the top level, with
  additional permissions only for the necessary run.
- Add .github/dependabot.yml
- Fix a typo in the website_workflow's filters.
- Run the snyk-scan only on the main repo, not forks, since it
  requires secrets.

Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm committed Mar 25, 2024
1 parent c28c320 commit 311c856
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "pip"
directory: "/"
schedule:
day: "monday"
interval: "weekly"

- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
day: "monday"
interval: "weekly"
3 changes: 3 additions & 0 deletions .github/workflows/release-notice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
- published
# published should cover both 'released' and 'prereleased'

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/snyk-scan-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ on:
schedule:
- cron: "0 4 * * 0"

permissions:
contents: read

jobs:
snyk-scan-pr:
runs-on: ubuntu-latest
if: github.repository == 'AcademySoftwareFoundation/openexr'
steps:
- uses: actions/checkout@v4

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/website_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ name: Website
on:

push:
branches:-ignore:
branches-ignore:
- RB-*
paths:
- 'website/**'
- '.github/workflows/website_workflow.yml'

pull_request:
branches:-ignore:
branches-ignore:
- RB-*
paths:
- 'website/**'
Expand Down

0 comments on commit 311c856

Please sign in to comment.