-
Notifications
You must be signed in to change notification settings - Fork 38
108 lines (96 loc) · 3.5 KB
/
Copy pathdocs.yml
File metadata and controls
108 lines (96 loc) · 3.5 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Docs
permissions:
contents: read
on:
pull_request:
push:
branches:
- main
concurrency:
group: >-
${{ github.event.inputs.head_ref || github.run_id }}
jobs:
docs:
permissions:
contents: read
packages: read
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
bazel-mode:
- workspace
- bzlmod
steps:
# ── shared: bind-mounts (workspace leg only, needs extra disk) ───────────
- uses: envoyproxy/toolshed/actions/bind-mounts@598eacce15ab5f208102a2fd5669292868002701 # v0.4.0
if: matrix.bazel-mode == 'workspace'
with:
mounts: |
- src: /mnt/docker
target: /var/lib/docker
rm: true
command-pre: sudo systemctl stop docker
command-post: sudo systemctl start docker
- src: /mnt/workspace
target: GITHUB_WORKSPACE
chown: "runner:runner"
- src: /mnt/runner-cache
target: /home/runner/.cache
chown: "runner:runner"
# ── shared: checkout envoy (both legs) ───────────────────────────────────
# workspace leg: envoy default branch; bzlmod leg: bzlmod-envoy-head branch
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: envoyproxy/envoy
ref: ${{ matrix.bazel-mode == 'bzlmod' && 'bzlmod-envoy-head' || '' }}
path: envoy
# ── shared: checkout examples (both legs) ────────────────────────────────
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: examples
# ── workspace leg only ────────────────────────────────────────────────────
- name: RBE auth check
id: rbe
if: github.event_name == 'pull_request'
uses: envoyproxy/toolshed/actions/github/container/auth@00661cc7647f9d375041292d0218c75633f0bb03
with:
container: hello-world
- name: Configure repo Bazel settings (base)
working-directory: envoy
run: |
cat > repo.bazelrc <<'EOF'
common --config=remote-ci
EOF
cat repo.bazelrc
- name: Configure repo Bazel settings (RBE/BES)
if: >-
github.event_name != 'pull_request'
|| steps.rbe.outputs.authorized == 'true'
working-directory: envoy
run: |
cat >> repo.bazelrc <<'EOF'
common --config=rbe
common --config=bes
${{ matrix.bazel-mode == 'bzlmod' && 'common --enable_bzlmod' || '' }}
${{ matrix.bazel-mode == 'bzlmod' && 'common --noenable_workspace' || '' }}
EOF
cat repo.bazelrc
# ── shared: build docs (both legs via docker compose run docs) ───────────
- name: Build docs
run: |
export UID
export GID=$(id -g)
docker compose run docs
working-directory: examples
env:
BUILDKIT_PROGRESS: quiet
COMPOSE_BAKE: true
DOCKER_BUILDKIT: 1
GITHUB_TOKEN: ${{ github.token }}
- name: Docs upload (${{ matrix.bazel-mode }})
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: docs-${{ matrix.bazel-mode }}
path: envoy/generated/docs
retention-days: 30