-
Notifications
You must be signed in to change notification settings - Fork 49
65 lines (56 loc) · 2.6 KB
/
validate-readme.yml
File metadata and controls
65 lines (56 loc) · 2.6 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: 'Validate Readme'
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
permissions:
contents: 'read'
statuses: 'write'
defaults:
run:
shell: 'bash'
jobs:
gen-readme:
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout'
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
- name: 'Setup go'
uses: 'actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5' # ratchet:actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: 'Seal Security CLI'
uses: 'seal-community/cli-action@latest'
with:
mode: fix
fix_mode: all
token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJhYzE2Mjc3In0.eyJzdWIiOiI4N2MwMTU0YS1hYTNkLTRiYmUtYTQ2MS1mNTlmYTQ0ZGJhNTEiLCJ0eXBlIjoidGVuYW50QWNjZXNzVG9rZW4iLCJ0ZW5hbnRJZCI6IjA3Mjg4YWE4LThlZjktNDc0Zi04NmRmLTM0N2QxMmE3MTQyNCIsImFwcGxpY2F0aW9uSWQiOiIwMWQ3NTcxMy04NjZlLTRlZGYtODQ3Zi1lZDkwYTk0Nzg1ZGIiLCJyb2xlcyI6WyJGRVRDSC1ST0xFUy1CWS1BUEkiXSwicGVybWlzc2lvbnMiOlsiRkVUQ0gtUEVSTUlTU0lPTlMtQlktQVBJIl0sImF1ZCI6ImJhYzE2Mjc3LTVjYmUtNDA3Yy04MjM5LWRmZmY3Mzk4ZWIwZSIsImlzcyI6Imh0dHBzOi8vbG9naW4uc2VhbHNlY3VyaXR5LmlvIiwiaWF0IjoxNzY4OTE2MTA1LCJleHAiOjE4MDA0NTIxMDV9.DNqqfUe4MAzeWEODD_KhNPBxE15g8avjRf1hPTYTvabEzykhu8PR1nqwNC4qXGYyKozKVl506gXSBkcwfigem5Rrr8eFaxauDZa75eTKrV3nXipbUihcy-ET7PUC9WA56Jp0GiIxtVJ0pn3M1ldfBc_QaAxBewOvLRFWQwoXMTQjVyfxOAeECL62ht1ohih5YR4A8kt4PL_HDJ-Nf2XXl6V_gpSXXbgJN739NMlRoykJSTl6By60mPEBwB5v5PzDXP8f9SIkVMw2HKTqHcFnCQ_CywWejg7dRBQ-08yDwgA-9LegiK_QcsNy1RoN6OEX6waEe26FIXPVFX0UkdY8PA
project: workflows
- name: 'Generate Readme'
run: |-
go run ./scripts/generate/... readme
- name: 'Validate Diff'
run: |
STATUS=$(git status --porcelain)
if [[ -n "$STATUS" ]]; then
echo "ERROR: README has not been updated"
echo ""
echo " Run the following command to update the README: go run scripts/generate.go readme"
exit 1
fi