forked from googleapis/google-cloud-go
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.28 KB
/
config_check.yml
File metadata and controls
40 lines (39 loc) · 1.28 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
---
name: config check
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
config-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Use this action, rather than a file filter so that we can make this
# mandatory.
# See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-including-branches
# for more details.
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
librarian:
- 'librarian.yaml'
- '.librarian/**'
- name: Config check
if: steps.filter.outputs.librarian == 'true'
run: |
V="$(sed -n 's/^version: *//p' librarian.yaml)"
go run "github.com/googleapis/librarian/tool/cmd/configcheck@${V}" .
- name: Update library versions and regenerate
if: failure()
run: |
echo "Library version is different between state.yaml and librarian.yaml.
Update versions in the configs according to the error message and
regenerate libraries using:
V=\$(sed -n 's/^version: *//p' librarian.yaml)
go run github.com/googleapis/librarian/cmd/librarian@\${V} generate --all
"