Skip to content

Commit

Permalink
ci: reuse Scorecard workflow (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb authored Oct 10, 2023
1 parent eb240ec commit 02a3ad1
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 83 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
tags:
- v*

permissions:
contents: read
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read
jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/clean-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- cron: "0 1 * * *" # every day at midnight
workflow_dispatch:

permissions:
contents: read
jobs:
trigger:
uses: statnett/workflows/.github/workflows/clean-ghcr.yaml@main
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/clear-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
name: Clear cache
on:
workflow_dispatch:

permissions:
actions: write
contents: read
jobs:
clear-cache:
permissions:
actions: write
runs-on: ubuntu-latest
steps:
- name: Clear cache
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
schedule:
- cron: "0 0 * * 1"

permissions:
contents: read
jobs:
trigger:
uses: statnett/github-workflows/.github/workflows/codeql.yaml@main
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]
---
name: Dependency Review
on:
pull_request:

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
release:
types:
- published

permissions:
contents: read
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- edited
- synchronize

permissions:
contents: read
jobs:
trigger:
uses: statnett/github-workflows/.github/workflows/lint-pr.yaml@main
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- main
workflow_dispatch:

permissions:
contents: read
jobs:
trigger:
uses: statnett/github-workflows/.github/workflows/release-please.yaml@main
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Scorecard supply-chain security
on:
branch_protection_rule:
schedule:
- cron: "20 7 * * 2"
push:
branches:
- main

permissions:
contents: read
jobs:
trigger:
uses: statnett/github-workflows/.github/workflows/scorecard.yaml@main
permissions:
security-events: write
id-token: write
contents: read
actions: read
71 changes: 0 additions & 71 deletions .github/workflows/scorecards.yml

This file was deleted.

0 comments on commit 02a3ad1

Please sign in to comment.