3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2026-08-07 12:01:21 +00:00
Commit graph

771 commits

Author SHA1 Message Date
Jasperhino
993ce21c74 Add env fallback for GCS cache bucket 2026-05-21 15:40:39 +02:00
Jasperhino
5ed4dd939d Clean up GCS fork: minimal changeset vs upstream actions/cache
Realign the fork so it diffs from upstream actions/cache only by the GCS
cache backend, instead of carrying unrelated downgrades and deletions.

- Restore package.json/package-lock.json to upstream 5.0.4 deps; the fork
  had downgraded to 4.2.x. Re-add @google-cloud/storage (gcsCache.ts needs it).
- Rebuild dist/ against the restored deps so it bundles the real GCS client
  rather than a stale build against downgraded deps.
- Restore deleted upstream files: 7 workflow YAMLs, .github/CODEOWNERS,
  .licensed.yml. (To be disabled in the fork, not removed.)
- Revert action.yml/restore/save manifests to upstream name/description/
  author; keep only the gcs-bucket/gcs-path-prefix inputs as the fork diff.
- auto-tag.yml: track upstream's highest semver release tag, moving both the
  exact-version tag and the major alias, instead of force-pinning v1.
- Remove checkout/ composite action; relocated to Cula-Technologies/checkout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 17:31:12 +02:00
Jasperhino
be02de94c3 gcsCache: return matched cache key, not gcs path
@actions/cache restoreCache contract returns the matched key (primary or
restore) so callers can compare to primaryKey for cache-hit. Our wrapper
was returning the full gcs object path, so restoreImpl.ts always set
cache-hit=false → every job ran pnpm install --frozen-lockfile on top of
a restored node_modules, burning ~34s per job for nothing.

findFileOnGCS now returns { key, path }; outer wrapper returns the key.
2026-04-24 12:55:06 +02:00
Jasperhino
01f9143258 checkout: unify cache on repo-<sha>, drop sparse/depth/filter inputs
Breaking: removes fetch-depth, filter, sparse-checkout, sparse-checkout-cone-mode
inputs. Composite always populates full history + blob:none so every caller
for the same SHA gets the same tarball. Cache key simplifies to repo-<sha>.

Rationale: every sparse callsite in cula-platform runs downstream of a
full-tree-populating job (find_affected). Full-tree restore (~3-5s) is
faster than sparse clone (~10-20s). One cache entry per SHA, no
fragmentation, no races on conflicting tarball contents.

If someone needs a sparse checkout outside the cache, use raw actions/checkout.
2026-04-24 11:27:55 +02:00
Jasperhino
bd80c7d455 checkout: add sparse-checkout-cone-mode passthrough
Required when sparse-checkout patterns include files (not just dirs) —
lint-github-docs uses cone-mode=false to pin package.json, pnpm-lock.yaml
etc. Without the passthrough actions/checkout treats files as dirs.
2026-04-24 11:08:59 +02:00
Jasperhino
94243edc16 checkout: use sh instead of bash for credentials strip
Composite runs inside container jobs (e.g. jest-runtime, e2e runtimes)
that don't ship bash. The one-line git config command works in POSIX sh.
2026-04-24 11:04:50 +02:00
Jasperhino
51d4504259 checkout: default gcs-bucket to cula-warpbuild-ci-cache-ew1
Callers can omit gcs-bucket and get the Cula cache bucket; override via
input for other setups. Empty string still opts out of caching entirely.
2026-04-24 10:58:14 +02:00
Jasperhino
f4c470a8aa checkout: add sparse-checkout input, bypass cache when sparse
Adds sparse-checkout input. When set, the composite skips GCS restore
and save entirely and falls through to a plain actions/checkout. This
keeps the full-tree cache uncontaminated by sparse subsets (which
would break subsequent full-tree reads on cache hit).
2026-04-24 10:57:19 +02:00
Jasperhino
4355f8bdbb Add checkout/ composite: GCS-cached working tree restore
First-step-capable checkout wrapper: uses Cula-Technologies/cache/restore
to pull a tarball of the repo keyed on SHA, falls back to actions/checkout
on miss then saves. Meant to be the first step of a job — avoids the
local-composite chicken-and-egg.
2026-04-24 10:46:08 +02:00
Jasper Blum
7c01473a9b
Merge pull request #1 from Cula-Technologies/gcs-cache-support
Add GCS cache backend with GitHub fallback
2026-04-23 13:12:10 +02:00
Jasperhino
cbe95a5765 Bump action runtime from node20 to node24 2026-04-23 13:08:11 +02:00
Jasperhino
cae5e556dd Trim upstream-specific workflows + CODEOWNERS
Drop workflows we don't need on the fork:
- licensed.yml (no .licenses for @google-cloud/storage)
- workflow.yml (jest tests mock @actions/cache, break with wrapper)
- close-inactive-issues, issue-opened, pr-opened (upstream oncall)
- publish-immutable-actions (not publishing to marketplace)
- release-new-action-version (replaced by auto-tag.yml)

Drop CODEOWNERS so merges don't require @actions/actions-cache review.
Drop .licensed.yml config (no longer used).
2026-04-23 13:05:25 +02:00
Jasperhino
5c1d51c316 Add auto-tag workflow to move v1 tag on main pushes 2026-04-23 12:56:13 +02:00
Jasperhino
d751c19fb0 Add GCS cache backend with GitHub fallback
Port GCS support from danySam/gcs-cache. When gcs-bucket input is set,
cache to Google Cloud Storage via Application Default Credentials; else
fall back to GitHub's cache service transparently.

- New inputs: gcs-bucket, gcs-path-prefix (default: github-cache)
- New src/utils/gcsCache.ts wraps @actions/cache restore/save
- restoreImpl/saveImpl swap @actions/cache import for local wrapper
- Adds @google-cloud/storage ^7.16.0, bumps typescript to ^5.8.3
- Regenerated dist/ via npm run build

Skipped: upstream workflow removals, README/examples/RELEASES churn,
licensed/codeql config, GCS integration-test workflow.
2026-04-23 12:48:47 +02:00
Yang Cao
27d5ce7f10
Merge pull request #1747 from actions/yacaovsnc/update-dependency
Update ts-http-runtime dependency
2026-04-13 11:36:02 -04:00
Yang Cao
f280785d7b licensed changes 2026-04-13 11:30:08 -04:00
Yang Cao
619aeb1606 npm run build generated dist files 2026-04-13 11:17:26 -04:00
Yang Cao
bcf16c2893 Update ts-http-runtime to 0.3.5 2026-04-13 11:14:40 -04:00
Bassem Dghaidi
668228422a
Merge pull request #1738 from actions/prepare-v5.0.4
Update dependencies & patch security vulnerabilities
2026-03-18 16:03:49 +01:00
Bassem Dghaidi
e34039626f Update RELEASES 2026-03-18 07:03:52 -07:00
Bassem Dghaidi
8a67110529 Add licenses 2026-03-18 06:34:30 -07:00
Bassem Dghaidi
1865903e1b Update dependencies & patch security vulnerabilities 2026-03-18 06:29:24 -07:00
Ryan Ghadimi
5656298164
Merge pull request #1722 from RyPeck/patch-1
Fix cache key in examples.md for bun.lock
2026-02-24 14:21:04 +00:00
Ryan Peck
4e380d19e1
Fix cache key in examples.md for bun.lock
Updated cache key to use 'bun.lock' instead of 'bun.lockb' for consistency.
2026-02-24 09:11:36 -05:00
Bassem Dghaidi
b7e8d49f17
Merge pull request #1701 from actions/Link-/fix-proxy-integration-tests
Fix proxy integration tests
2026-01-30 16:37:01 +01:00
Bassem Dghaidi
984a21b1cb Add traffic sanity check step 2026-01-30 02:05:51 -08:00
Bassem Dghaidi
acf2f1f76a Fix resolution 2026-01-30 02:03:12 -08:00
Bassem Dghaidi
95a07c5132 Add wait for proxy 2026-01-30 02:00:09 -08:00
Bassem Dghaidi
90e4fae240 Rewrite and simplify 2026-01-30 01:56:07 -08:00
Bassem Dghaidi
b45623637f
Merge pull request #1690 from XZTDean/docs/v5-example-update
docs: Update examples to use the latest version
2026-01-29 11:36:35 +01:00
Bassem Dghaidi
bdb94ce451
Merge branch 'main' into docs/v5-example-update 2026-01-29 11:32:26 +01:00
Bassem Dghaidi
cb6ea63971
Merge pull request #1699 from actions/Link-/fix-workflow-permissions
Fix workflow permissions and cleanup workflow names / formatting
2026-01-29 11:31:19 +01:00
Bassem Dghaidi
49bc452f55 Merge branch 'Link-/fix-workflow-permissions' of github.com:actions/cache into Link-/fix-workflow-permissions 2026-01-29 02:27:40 -08:00
Bassem Dghaidi
1e06c934a1
Merge branch 'main' of github.com:actions/cache into Link-/fix-workflow-permissions 2026-01-29 02:27:32 -08:00
Bassem Dghaidi
a838313d22
Merge pull request #1697 from actions/alert-autofix-52
Potential fix for code scanning alert no. 52: Workflow does not contain permissions
2026-01-29 11:26:02 +01:00
Bassem Dghaidi
6e48a73476
Update .github/workflows/pr-opened-workflow.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-29 11:25:11 +01:00
Bassem Dghaidi
9848277c90 Cleanup workflow file names 2026-01-29 02:19:45 -08:00
Bassem Dghaidi
94056f1871 Fix workflow permissions and cleanup 2026-01-29 02:17:35 -08:00
Bassem Dghaidi
b56bb3a202 Fix permissions for workflows/workflow.yml 2026-01-29 02:11:09 -08:00
Bassem Dghaidi
4a6586c009
Merge branch 'main' into alert-autofix-52 2026-01-29 11:04:16 +01:00
Bassem Dghaidi
0de23fd4eb
Merge pull request #1696 from actions/Link-/release-docs
Add release instructions and update maintainer docs
2026-01-29 11:03:40 +01:00
Bassem Dghaidi
4e38c8636e
Potential fix for code scanning alert no. 52: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-01-29 11:02:45 +01:00
Bassem Dghaidi
24e8b877a8 Add note 2026-01-29 01:58:41 -08:00
Bassem Dghaidi
3baa5f1c7b Update contribution docs 2026-01-29 01:58:05 -08:00
Bassem Dghaidi
cdf6c1fa76
Merge pull request #1695 from actions/Link-/prepare-5.0.3
Prepare v5.0.3 release
2026-01-29 10:43:43 +01:00
Bassem Dghaidi
a1bee22673 Add review for the @actions/http-client license 2026-01-29 01:39:24 -08:00
Bassem Dghaidi
46957638dc
Add licensed output 2026-01-29 01:31:38 -08:00
Bassem Dghaidi
dc73bb9f7b Upgrade dependencies and address security warnings
- Bump `@actions/cache` to v5.0.5
- Bump `@actions/core` to v2.0.3
2026-01-29 01:25:30 -08:00
Bassem Dghaidi
345d5c2f76
Add 5.0.3 builds 2026-01-29 01:24:44 -08:00
Ryan Ghadimi
8b402f58fb
Merge pull request #1692 from GhadimiR/main
Bump @actions/cache to 5.0.3
2026-01-16 17:25:13 +00:00