Commit Graph

93 Commits

Author SHA1 Message Date
Claude
4c54035b2b refactor: remove nofallback parameter
Remove the nofallback input parameter as it's no longer needed. The action
now assumes that a builder is already configured and available.

Changes:
- Remove nofallback from action.yml inputs
- Remove nofallback from Inputs interface and getInputs function
- Update tests to remove nofallback references
- Also remove setup-only and buildx-version from action.yml (already removed from code)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 14:52:41 -04:00
Claude
fece9d42f3 refactor: remove tmpDir management and buildx installation
Since setup-docker-builder handles all infrastructure setup, build-push-action
no longer needs to:
- Install buildx (just assert it's available)
- Manage temporary directories (handled by actions toolkit)

Changes:
- Replace buildx installation with simple availability assertion
- Remove tmpDir state management entirely
- Remove buildx-version input parameter
- Clean up unused imports and functions

The action now assumes buildx is already configured by setup-docker-builder
or another setup action, making it simpler and more focused.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 14:49:31 -04:00
Claude
cc46a915dd refactor: complete removal of buildkit and sticky disk management
This commit completes the refactoring of build-push-action to focus solely on
Docker build reporting and metrics, with all infrastructure management moved
to the separate setup-docker-builder action.

Changes:
- Remove all setupOnly references from context.ts, main.ts, and state-helper.ts
- Rename startBlacksmithBuilder to reportBuildMetrics to better reflect its purpose
- Remove exposeId from all function signatures and state management
- Remove sticky disk commit logic from reporter.ts
- Update tests to match new function names and signatures
- Clean up unused imports and fix linting issues

The action now assumes that a Docker builder has already been configured
(either via setup-docker-builder or existing setup) and focuses only on:
- Running Docker builds with the configured builder
- Reporting build metrics and status to Blacksmith API
- Managing build outputs and metadata

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 14:25:57 -04:00
Claude
a7fa33c366 fix: use correct platform when creating remote buildx builder
The remote builder was hardcoded to use --platform linux/amd64
regardless of user input or runner architecture. This caused
performance issues on ARM runners and cache inefficiencies.

Now properly uses the platforms input or detects host architecture
to avoid unnecessary QEMU emulation and improve build performance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-11 12:59:55 -04:00
Claude
28c244705c *: allow users to pass in a buildx version 2025-05-30 12:31:51 -04:00
Claude
ab514e31b5 *: introduce a setup-only mode to the build-push-action
This setup-only mode will setup a docker builder with the stickydisk
mounted but will not run a Docker build. The use case here is to allow
customers to then run their custom Tilt files or Docker commands against
our builder. The other subtle change is that we only cleanup in the post
step of this builder action. It is still to be seen if you can start several
of these builders at the same time in a workflow but we can do that as a follow
on.
2025-04-14 16:36:36 -07:00
Aayush Shah
f8d1c2e2ae
*: normalize file paths in all cases (#104) 2025-03-06 17:24:56 -05:00
Aayush
8554acbf59
src: prevent path duplication when dockerfile is within context 2025-01-09 10:03:58 -05:00
Aayush Shah
c03b613806
use local dockerfile path over git context (#86) 2024-12-31 13:08:49 -05:00
Aayush Shah
7b8642822f
src: make getDockerfilePath return the full path to the dockerfile (#64)
Previously we were just returning the path to the dir containing the dockerfile
in most cases.
2024-12-09 12:20:46 -05:00
Aayush Shah
ed90c2b818
log the input context as well as the final context (#39) 2024-11-23 16:22:19 -05:00
Aditya Maru
31a478457f *: hit sentry on failures to get remote docker builders 2024-11-12 19:23:57 -07:00
Aditya Maru
d778ef8660 *: ignore the inputs builder 2024-11-11 17:16:54 -07:00
Aditya Maru
3b1df39d5d *: teach action to hot load sticky disks
This change teaches the build push action to request a stickydisk
every time it runs. Once the SD is hotloaded the VM will mount
the buildkit root dir and starts buildkitd.
2024-11-01 21:14:17 +05:30
Aayush Shah
3f6698f877
tls (#12)
* tls

* set up tls while creating the remote builder
2024-10-02 16:57:18 -04:00
Aayush
5158225acc
normalize dockerfile paths 2024-09-27 16:06:04 -04:00
Aayush Shah
294f759b05
add a fallback input (#7) 2024-09-20 20:21:04 -04:00
Aayush
cb250fea79
plumb through the dockerfile path when creating a build_task 2024-09-12 17:53:59 -07:00
Aditya Maru
29a5593aa1 *: basic scaffolding for build-push-action
1. Checks we have buildx installed
2. Configures a remote builder if we get an address back
3. Uses the already configured builder if we don't get an address back

This change does not plumb the dockerfile path through as the entity,
and does not differentiate a failed build from a succesful to report
to anvil in the post step yet.
2024-09-11 20:08:08 -04:00
CrazyMax
d189d0ef33
Revert "set repository and ghtoken attributes for gha cache type"
This reverts commit 522345f555.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-17 10:47:38 +02:00
CrazyMax
522345f555
set repository and ghtoken attributes for gha cache type
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-03 10:02:24 +02:00
CrazyMax
d880b1964b
generate build summary
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-14 16:06:08 +02:00
CrazyMax
54d0f58d64
fixes related to actions-toolkit 0.23.0 changes
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-14 14:11:32 +02:00
CrazyMax
1d5307d7af
align interface fields with action inputs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-05-06 12:08:12 +02:00
CrazyMax
eb3cfeaf00
switch to new Build class
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-26 11:20:49 +02:00
CrazyMax
96acf63e4c
handle attests correctly with provenance and sbom inputs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-02 10:54:20 +02:00
CrazyMax
6c2079483e
disable quotes detection for "outputs" input
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-06 15:25:57 +01:00
favonia
8411d080ee
feat: warn about ignored inputs
Currently, several inputs can be silently ignored without
any warnings. This change will issue a warning for each
ignored input with a short explanation.

Signed-off-by: favonia <favonia@gmail.com>
2023-12-01 07:50:51 -06:00
CrazyMax
248131c7bf
add annotations input
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-27 06:43:13 +02:00
Elias Lundgren
5f01267817
feat: add secret-envs input
Signed-off-by: Elias Lundgren <145569914+elias-lundgren@users.noreply.github.com>
2023-10-11 15:43:05 +02:00
CrazyMax
a54198e85a
use new implementation from toolkit
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-17 02:09:47 +02:00
CrazyMax
b3435979d1
use methods from toolkit to handle provenance attrs
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-03-12 23:37:34 +01:00
CrazyMax
d8823bfaed
switch to actions-toolkit implementation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-02-24 10:22:19 +01:00
CrazyMax
f403dafe18
revert disable provenance by default if not set
This partially reverts 337a09d182 but
keeps the newly added tests.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-30 19:23:00 +01:00
CrazyMax
337a09d182
disable provenance by default if not set
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-30 10:15:05 +01:00
CrazyMax
0191543e0b
fix provenance input
When `provenance: false`, we should not set the builder-id.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-13 12:59:31 +01:00
CrazyMax
9b96801525
Revert build-args newline split
This reverts commit 6afac853c9, reversing
changes made to 1d910c8aa2.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-13 11:27:13 +01:00
ruslandoga
316d5eb8b3 build-args newline split
Signed-off-by: ruslandoga <67764432+ruslandoga@users.noreply.github.com>
2023-01-13 12:51:11 +07:00
CrazyMax
0cb700ffba
do not set default provenance if user wants to load the image
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-11 15:56:25 +01:00
CrazyMax
ee7989df81
always set builder-id attribute for provenance
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-11 15:56:25 +01:00
CrazyMax
74f883a069
check BuildKit compatibility before setting default provenance opts
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-11 15:56:25 +01:00
CrazyMax
26ce4f3617
provenance: set mode max and builder-id for public repos by default
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-11 15:56:24 +01:00
CrazyMax
ed2672fc33
add attests, provenance and sbom inputs
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-11 15:56:24 +01:00
CrazyMax
75aaa63262
Remove workaround for setOutput
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-12 06:56:31 +02:00
CrazyMax
30a32246ba
Fix GitHub token not passed with Git context if subdir defined
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-03 14:39:01 +02:00
CrazyMax
5ffbca1432
no-cache-filters input
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-19 00:04:41 +02:00
CrazyMax
38b45804b5
Standalone mode support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-28 09:31:51 +02:00
CrazyMax
5ea21bf2ba
Fix csv-parse implementation since major update
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-25 06:47:57 +02:00
CrazyMax
2d081a4fd5
chore: update dev dependencies and workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-15 21:59:59 +01:00
CrazyMax
7c41daf2a5
build-contexts input
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-14 20:09:15 +01:00