-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (52 loc) · 1.59 KB
/
build-all.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
59
60
61
62
63
64
name: Build all
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/[email protected]
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Build with Bazel
run: bazel build //...
- name: Test Chart
run: bazel test //chart/...
- name: Test Core Image
run: bazel test //core-image/...
- name: Test Onyx
run: bazel test //onyx/...
- name: Test Python apps
continue-on-error: true # currently failing
run: bazel test //yaku-apps-python/...
####
## only on push to main
####
- name: Log in to the Container registry
if: github.event_name == 'push'
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push the core image to the OCI registry
if: github.event_name == 'push'
#run: bazel run --embed_label="${GITHUB_SHA::6}" --stamp //core-image:push-image
run: bazel run //core-image:push-image
- name: Push the chart to the OCI registry
if: github.event_name == 'push'
run: bazel run //chart:yaku_helm.push_registry