-
Notifications
You must be signed in to change notification settings - Fork 2
/
grep.sh
28 lines (23 loc) · 872 Bytes
/
grep.sh
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
#!/usr/bin/env bash
set -euo pipefail
# Verify that no internal Actions are using `actions/checkout`
# See reasoning in ./github/actions/README.md
# Note: splitting command in two to avoid using pipe because
# we set -o pipefail option and grep returns 1 when there is no match
this_file="e2e.generic.tag.main.annotated.slsa3.yml"
# echo "THIS_FILE: $this_file"
# echo "blo"
# which grep
# ls -l "$(which grep)"
# echo "done"
# #annotated_tags=$(echo "$this_file" | cut -d '.' -f5 | grep annotated)
# echo "hello"
echo "hello"
echo "$this_file" | grep "hello"
echo "hi"
# results=$(grep -r --include='*.yml' --include='*.yaml' -e 'dactions/checkout@\|dactions/checkout-go@' .github/workflows/* | grep -v 'checkout-go\|generate-builder')
# if [[ "$results" != "" ]]; then
# echo "Some Actions are using 'actions/checkout'"
# echo "$results"
# exit -1
# fi