-
Notifications
You must be signed in to change notification settings - Fork 53
35 lines (30 loc) · 866 Bytes
/
meta.yml
File metadata and controls
35 lines (30 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: meta
on:
push:
branches:
- main
pull_request:
workflow_dispatch: # Allows manual invocation
jobs:
meta:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Ensure third-party actions are pinned to commit SHAs
run: |
result=$( \
find .github -name '*.yml' | \
xargs grep -Ei 'uses:\s*[a-z0-9_.-]+\/[a-z0-9_.-]+@' | \
grep -Eiv '@[a-z0-9]{40}' | \
cat \
)
if [[ -z "$result" ]]
then
echo "Validated all third-party actions"
else
echo "Error: third-party GitHub actions MUST be pinned to a commit SHA."
echo "$result"
exit 1
fi