Skip to content

Commit ccc77df

Browse files
committed
chore: add deprecation warning for v1
This version is no longer maintained. Users should upgrade to v2 as outlined in: https://docs.blacksmith.sh/blacksmith-caching/docker-builds
1 parent ca7f4dd commit ccc77df

File tree

7 files changed

+6029
-2
lines changed

7 files changed

+6029
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

no-cache-verification.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# No-Cache Option Verification Report
2+
3+
## Summary
4+
The `no-cache` option is **properly plumbed through** in the `respect-no-cache` branch and will be passed to the Docker buildx command when enabled.
5+
6+
## Code Flow Analysis
7+
8+
### 1. Input Declaration (action.yml:56-59)
9+
```yaml
10+
no-cache:
11+
description: "Do not use cache when building the image"
12+
required: false
13+
default: 'false'
14+
```
15+
16+
### 2. Input Reading (src/context.ts:80)
17+
```typescript
18+
'no-cache': core.getBooleanInput('no-cache')
19+
```
20+
The input is read as a boolean value from GitHub Actions inputs.
21+
22+
### 3. Argument Construction (src/context.ts:273-275)
23+
```typescript
24+
if (inputs['no-cache']) {
25+
args.push('--no-cache');
26+
}
27+
```
28+
When `no-cache` is true, the `--no-cache` flag is added to the buildx arguments.
29+
30+
### 4. Command Execution (src/main.ts:304-310)
31+
```typescript
32+
const buildCmd = await toolkit.buildx.getCommand(args);
33+
// ...
34+
await Exec.getExecOutput(buildCmd.command, buildCmd.args, ...)
35+
```
36+
The arguments (including `--no-cache` if present) are passed to the buildx command.
37+
38+
## Verification Results
39+
40+
### When `no-cache: true`
41+
- The `--no-cache` flag WILL be added to the docker buildx build command
42+
- BuildKit will not use any cached layers from previous builds
43+
- The entire image will be rebuilt from scratch
44+
- This ensures fresh dependencies and no stale cache issues
45+
46+
### When `no-cache: false` (default)
47+
- The `--no-cache` flag will NOT be added
48+
- BuildKit will use its normal caching behavior
49+
- Cached layers from previous builds will be reused when possible
50+
- This provides faster builds when cache is valid
51+
52+
## Impact on Remote Builder
53+
Since your builder is a custom remote builder that shares BuildKit across various runs:
54+
- With `no-cache: true` - The remote BuildKit instance will ignore all existing cache layers for this specific build
55+
- With `no-cache: false` - The remote BuildKit instance will use its shared cache pool as normal
56+
57+
## Conclusion
58+
The `no-cache` option is correctly implemented and will effectively control whether the remote BuildKit instance uses cached layers. When set to `true`, it forces a complete rebuild without using any cached layers, which is exactly what you'd expect for ensuring fresh builds.

0 commit comments

Comments
 (0)