Skip to content

Commit 753ef1b

Browse files
authored
Merge pull request #27 from dash14/docs/update-assets
Update docs, examples, and assets for v2
2 parents b27a45a + 8f244b2 commit 753ef1b

File tree

11 files changed

+28
-30
lines changed

11 files changed

+28
-30
lines changed

.github/workflows/example-audit.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ jobs:
1111

1212
steps:
1313
- name: Start Buildcage builder
14-
id: buildcage
15-
uses: dash14/buildcage/setup@v1
14+
uses: dash14/buildcage/setup@v2
1615
with:
1716
proxy_mode: audit
1817

1918
- name: Set up Docker Buildx
20-
uses: docker/setup-buildx-action@v3
19+
uses: docker/setup-buildx-action@v4
2120
with:
2221
driver: remote
23-
endpoint: tcp://localhost:${{ steps.buildcage.outputs.port }}
22+
endpoint: docker-container://buildcage
2423

2524
- name: Create test Dockerfile
2625
run: |
@@ -43,4 +42,4 @@ jobs:
4342

4443
- name: Show proxy report
4544
if: always()
46-
uses: dash14/buildcage/report@v1
45+
uses: dash14/buildcage/report@v2

.github/workflows/example-restrict.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ jobs:
1111

1212
steps:
1313
- name: Start Buildcage builder
14-
id: buildcage
15-
uses: dash14/buildcage/setup@v1
14+
uses: dash14/buildcage/setup@v2
1615
with:
1716
proxy_mode: restrict
1817
allowed_https_rules: >-
1918
registry.npmjs.org:443
2019
fonts.googleapis.com:443
2120
2221
- name: Set up Docker Buildx
23-
uses: docker/setup-buildx-action@v3
22+
uses: docker/setup-buildx-action@v4
2423
with:
2524
driver: remote
26-
endpoint: tcp://localhost:${{ steps.buildcage.outputs.port }}
25+
endpoint: docker-container://buildcage
2726

2827
- name: Create test Dockerfile
2928
run: |
@@ -47,6 +46,6 @@ jobs:
4746

4847
- name: Show proxy report
4948
if: always()
50-
uses: dash14/buildcage/report@v1
49+
uses: dash14/buildcage/report@v2
5150
with:
5251
fail_on_blocked: false

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ jobs:
9191

9292
- name: Start Buildcage in audit mode
9393
id: buildcage
94-
uses: dash14/buildcage/setup@v1
94+
uses: dash14/buildcage/setup@v2
9595
with:
9696
proxy_mode: audit # Log everything, block nothing
9797

9898
- name: Set up Docker Buildx
99-
uses: docker/setup-buildx-action@v3
99+
uses: docker/setup-buildx-action@v4
100100
with:
101101
driver: remote
102102
endpoint: docker-container://buildcage
@@ -109,7 +109,7 @@ jobs:
109109

110110
- name: Show Buildcage report
111111
if: always()
112-
uses: dash14/buildcage/report@v1
112+
uses: dash14/buildcage/report@v2
113113
with:
114114
fail_on_blocked: false # Don't fail, just show the report
115115
```
@@ -139,15 +139,15 @@ jobs:
139139
140140
- name: Start Buildcage in restrict mode
141141
id: buildcage
142-
uses: dash14/buildcage/setup@v1
142+
uses: dash14/buildcage/setup@v2
143143
with:
144144
proxy_mode: restrict # Block everything except allowed domains
145145
allowed_https_rules: >-
146146
registry.npmjs.org:443
147147
fonts.googleapis.com:443
148148
149149
- name: Set up Docker Buildx
150-
uses: docker/setup-buildx-action@v3
150+
uses: docker/setup-buildx-action@v4
151151
with:
152152
driver: remote
153153
endpoint: docker-container://buildcage
@@ -160,7 +160,7 @@ jobs:
160160
161161
- name: Show Buildcage report
162162
if: always()
163-
uses: dash14/buildcage/report@v1
163+
uses: dash14/buildcage/report@v2
164164
# Build fails if any unexpected connections were blocked
165165
```
166166

@@ -177,7 +177,7 @@ Starts the Buildcage builder container.
177177
```yaml
178178
- name: Start Buildcage builder
179179
id: buildcage
180-
uses: dash14/buildcage/setup@v1
180+
uses: dash14/buildcage/setup@v2
181181
with:
182182
proxy_mode: restrict
183183
allowed_https_rules: registry.npmjs.org:443 github.com:443
@@ -216,7 +216,7 @@ Pass the container name to [`docker/setup-buildx-action`](https://github.com/doc
216216

217217
```yaml
218218
- name: Set up Docker Buildx
219-
uses: docker/setup-buildx-action@v3
219+
uses: docker/setup-buildx-action@v4
220220
with:
221221
driver: remote
222222
endpoint: docker-container://buildcage
@@ -261,7 +261,7 @@ Displays communication logs after builds and optionally fails if any BLOCKED con
261261
```yaml
262262
- name: Show proxy report
263263
if: always()
264-
uses: dash14/buildcage/report@v1
264+
uses: dash14/buildcage/report@v2
265265
```
266266

267267
#### Job Summary

assets/diagram-architecture.png

-1.01 KB
Loading

assets/diagram-overview.png

-542 Bytes
Loading

assets/report-audit-mode.png

25.8 KB
Loading

docs/development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ Fields: `[timestamp] buildcage [status] "domain:port" reason`
9191
```
9292
.
9393
├── setup/ # GitHub Actions setup
94-
│ ├── action.yml # GitHub Action: dash14/buildcage/setup@v1
94+
│ ├── action.yml # GitHub Action: dash14/buildcage/setup@v2
9595
│ ├── compose.yml # Compose config for GitHub Actions (with image tag)
9696
│ ├── main.mjs # Setup entrypoint (rule generation, compose up)
9797
│ └── post.mjs # Post-action cleanup
9898
├── report/ # GitHub Actions report
99-
│ ├── action.yml # GitHub Action: dash14/buildcage/report@v1
99+
│ ├── action.yml # GitHub Action: dash14/buildcage/report@v2
100100
│ └── main.mjs # Log analysis and Job Summary output
101101
├── docker/
102102
│ ├── Dockerfile # Multi-stage BuildKit + haproxy + dnsmasq + s6-overlay

docs/rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Since the regex is tested against the `domain:port` string, include a port patte
6767

6868
```yaml
6969
- name: Start Buildcage
70-
uses: dash14/buildcage/setup@v1
70+
uses: dash14/buildcage/setup@v2
7171
with:
7272
proxy_mode: restrict
7373

docs/self-hosting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ jobs:
7979

8080
- name: Start Buildcage
8181
id: buildcage
82-
uses: <your_org>/buildcage/setup@v1
82+
uses: <your_org>/buildcage/setup@v2
8383
with:
8484
proxy_mode: audit
8585
# ... rest of your workflow
8686
```
8787

88-
Note that `uses:` now points to `<your_org>/buildcage/setup@v1` instead of `dash14/buildcage/setup@v1`. The same applies to the report action (`<your_org>/buildcage/report@v1`).
88+
Note that `uses:` now points to `<your_org>/buildcage/setup@v2` instead of `dash14/buildcage/setup@v2`. The same applies to the report action (`<your_org>/buildcage/report@v2`).
8989

9090
## Syncing with Upstream
9191

report/lib/build-example.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function buildRestrictExample(auditedRows, actionRepo) {
2828
// Build YAML lines
2929
let yaml = "";
3030
yaml += "- name: Start Buildcage in restrict mode\n";
31-
yaml += ` uses: ${actionRepo}/setup@v1\n`;
31+
yaml += ` uses: ${actionRepo}/setup@v2\n`;
3232
yaml += " with:\n";
3333
yaml += " proxy_mode: restrict\n";
3434
for (const [param, rules] of groups) {

0 commit comments

Comments
 (0)