@tahminator/pipeline 1.0.92 → 1.0.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -333,6 +333,8 @@ The diff is split per Kubernetes object (matched by API group, kind, namespace a
333
333
 
334
334
  Interface with Docker to build & deploy images
335
335
 
336
+ `buildImage` runs BuildKit on the runner's network with `--network host`, so every `RUN` instruction can reach whatever the runner can, including hosts on the Headscale VPN connected by the setup action. Dockerfiles don't need `RUN --network=host`.
337
+
336
338
  ```ts
337
339
  // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html#using-declarations-and-explicit-resource-management
338
340
  await using client = await DockerClient.create(
@@ -423,6 +425,18 @@ View the [action file](./actions/setup/action.yaml) for all available inputs.
423
425
  cargo-nextest@0.9.100
424
426
  ```
425
427
 
428
+ Language toolchains are installed and cached by the setup action, so jobs don't need separate `setup-go` / `setup-java` / `rust-toolchain` steps:
429
+
430
+ ```yaml
431
+ - uses: tahminator/pipeline/actions/setup@<version>
432
+ with:
433
+ INSTALL_GO: "true" # version read from GO_VERSION_FILE (default go.mod) unless GO_VERSION is set
434
+ INSTALL_JAVA: "true" # JAVA_VERSION "21", JAVA_DISTRIBUTION "temurin", JAVA_CACHE "maven" by default
435
+ INSTALL_RUST: "true" # also caches the Cargo registry and target dir
436
+ RUST_TOOLCHAIN: "1.93.0"
437
+ RUST_COMPONENTS: "clippy, rustfmt"
438
+ ```
439
+
426
440
  ### `NPMClient`
427
441
 
428
442
  Interface with NPM registry in order to publish packages to `npmjs.com`
@@ -48,7 +48,10 @@ export class DockerClient {
48
48
  console.log("Building image with following tags:");
49
49
  tags.forEach((tag) => console.log(Utils.Colors.cyan(tag)));
50
50
  try {
51
- await $ `docker buildx create --use --name ${dockerRepository}-builder`;
51
+ await $ `docker buildx create --use --name ${dockerRepository}-builder \
52
+ --driver docker-container \
53
+ --driver-opt network=host \
54
+ --buildkitd-flags ${"--allow-insecure-entitlement network.host"}`;
52
55
  }
53
56
  catch {
54
57
  await $ `docker buildx use ${dockerRepository}-builder`;
@@ -68,6 +71,8 @@ export class DockerClient {
68
71
  --cache-from=type=gha \
69
72
  --cache-to=type=gha,mode=max \
70
73
  ${buildArgFlags} \
74
+ --network host \
75
+ --allow network.host \
71
76
  ${tagFlags} \
72
77
  .`;
73
78
  console.log(shouldUpload ?
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "author": "Tahmid Ahmed",
5
5
  "description": "A collection of Bun shell scripts that can be re-used in various CICD pipelines.",
6
- "version": "1.0.92",
6
+ "version": "1.0.93",
7
7
  "repository": {
8
8
  "url": "git+https://github.com/tahminator/pipeline.git"
9
9
  },