-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Implement repo and PR check for SHA pinned actions/workflows
Signed-off-by: Matthew Watkins <[email protected]>
- Loading branch information
1 parent
cc59fef
commit a90de69
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# SPDX-FileCopyrightText: 2024 The Linux Foundation | ||
|
||
name: "[MV] Check Action SHA Pinning" | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
paths: [".github/**"] | ||
|
||
jobs: | ||
### Test Version Pinned Actions ### | ||
test-versions: | ||
name: "Check Action SHA Pinning" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check entire repository on workflow_dispatch | ||
- name: "Checkout entire repository" | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
|
||
# Otherwise, just check the current pull request | ||
- name: "Ensure SHA pinned actions" | ||
# yamllint disable-line rule:line-length | ||
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@ed00f72a3ca5b6eff8ad4d3ffdcacedb67a21db1 # v3.0.15 |