Skip to content

feat(cluster): install act for local GitHub Actions workflow runs - #3968

Merged
knative-prow[bot] merged 2 commits into
knative:mainfrom
lkingland:coder.functions.2/62
Jul 31, 2026
Merged

feat(cluster): install act for local GitHub Actions workflow runs#3968
knative-prow[bot] merged 2 commits into
knative:mainfrom
lkingland:coder.functions.2/62

Conversation

@lkingland

@lkingland lkingland commented Jul 25, 2026

Copy link
Copy Markdown
Member

Changes

  • 🎁 Install pinned act (nektos/act v0.2.88) via func cluster create into $XDG_CONFIG_HOME/func/bin, alongside kubectl and kind — so func config ci workflows can be exercised locally.
  • 🎁 Generic .tar.gz install path in pkg/cluster/binaries.go (ArchiveEntry): verify the archive SHA-256, then extract a regular-file entry atomically (size/type guards). Windows: close archive handles before renaming over the download path.
  • 🧹 ActOverride + exported ClusterConfig.Act() (managed BinDir, then PATH); CLI samples FUNC_TEST_ACT like kubectl/kind.
  • 🧹 e2e config-ci resolves act via cluster.ClusterConfig{…}.Act() (not a hand-built config.Dir() path).
  • 🧹 Unit tests for extractFromTarGz; cache hit is existence-only (archive pin ≠ extracted binary).

Checksums match the official v0.2.88 checksums.txt for linux/darwin amd64+arm64.

/kind enhancement

Release Note

func cluster create now installs act for local GitHub Actions workflow runs

Docs

  • Docs PR required (link below)
  • Docs not required

Functions#62

@knative-prow knative-prow Bot added kind/enhancement Feature additions or improvements to existing approved 🤖 PR has been approved by an approver from all required OWNERS files. labels Jul 25, 2026
@knative-prow
knative-prow Bot requested review from dsimansk and jrangelramos July 25, 2026 15:18
@knative-prow knative-prow Bot added the size/L 🤖 PR changes 100-499 lines, ignoring generated files. label Jul 25, 2026
@lkingland
lkingland force-pushed the coder.functions.2/62 branch 3 times, most recently from c613f6e to 0a3dbbc Compare July 28, 2026 00:14
Comment thread e2e/e2e_config_ci_test.go Outdated
@gauron99 gauron99 self-assigned this Jul 29, 2026
Adds act (nektos/act v0.2.88) via func cluster create into
$XDG_CONFIG_HOME/func/bin, with tar.gz extract support (ArchiveEntry).

Windows: close archive handles before renaming over the download path
(os.Rename Access is denied while the source is still open).

e2e config-ci prefers managed BinDir/act over bare PATH.

Functions#62
Address review on knative#3968: PR claimed ActOverride/act but they were dropped
as unused after lint. Restore ActOverride + exported Act() (BinDir then
PATH), sample FUNC_TEST_ACT like kubectl/kind, and resolve act in e2e
config-ci via ClusterConfig.Act() instead of hand-building config.Dir().

Functions#62
@lkingland
lkingland force-pushed the coder.functions.2/62 branch from 0a3dbbc to f63dcbd Compare July 30, 2026 06:00
@lkingland

Copy link
Copy Markdown
Member Author

@gauron99 Good catch — they were dropped when golangci flagged an unused unexported act() after e2e still hand-built the path.

Restored and wired properly in the latest commit:

  • ActOverride + exported ClusterConfig.Act() (BinDir → PATH)
  • CLI samples FUNC_TEST_ACT (same family as FUNC_TEST_KUBECTL / FUNC_TEST_KIND)
  • e2e config-ci now uses cluster.ClusterConfig{ActOverride: os.Getenv("FUNC_TEST_ACT")}.Act()

Thanks!

Comment thread pkg/cluster/binaries.go
Checksums: actChecksums,
ArchiveEntry: "act",
URL: func(goos, goarch string) string {
// GitHub release asset names are case-insensitive, so goos

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I verified the case-insensivity too but did not find any documentation on it; if GH ever changes that CDN behaviour, we might get some failures :D

@gauron99 gauron99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label Jul 31, 2026
@knative-prow

knative-prow Bot commented Jul 31, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gauron99, lkingland

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow
knative-prow Bot merged commit df7057c into knative:main Jul 31, 2026
43 checks passed
@lkingland
lkingland deleted the coder.functions.2/62 branch July 31, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. kind/enhancement Feature additions or improvements to existing lgtm 🤖 PR is ready to be merged. size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants