-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.39 KB
/
format.yml
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
name: Build example project
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
format_projects:
name: "Build - ${{ matrix.name }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Set up Go 1.20.x
uses: actions/setup-go@v5
with:
go-version: 1.20.x
cache: false
id: go
- name: Setup Cache
uses: actions/cache@v3
with:
path: |
~/bzlmod_cache/*.sha256
key: ${{ runner.os }}-${{ hashFiles('**/generate/**') }}
restore-keys: |
${{ runner.os }}-
${{ runner.os }}
- uses: actions/setup-python@v5
with:
python-version: '3.10.8'
- name: Install Buildifier
run: |
cd $(mktemp -d)
GO111MODULE=on go install github.com/bazelbuild/buildtools/buildifier@latest
- run: ./generate_subprojects.sh
working-directory: monorepo_tools
- name: Check Output
run: git --no-pager diff --exit-code HEAD --submodule=diff
- name: Generate diff
run: git diff HEAD --submodule=diff > generation-fixes.patch
if: ${{ failure() }}
- uses: actions/upload-artifact@v4
with:
name: generation fixes
path: generation-fixes.patch
if: ${{ failure() }}