Merge gitea/act into act/

Merges the `gitea.com/gitea/act` fork into this repository as the `act/`
directory and consumes it as a local package. The `replace github.com/nektos/act
=> gitea.com/gitea/act` directive is removed; act's dependencies are merged
into the root `go.mod`.

- Imports rewritten: `github.com/nektos/act/pkg/...` → `gitea.com/gitea/act_runner/act/...`
  (flattened — `pkg/` boundary dropped to match the layout forgejo-runner adopted).
- Dropped act's CLI (`cmd/`, `main.go`) and all upstream project files; kept
  the library tree + `LICENSE`.
- Added `// Copyright <year> The Gitea Authors ...` / `// Copyright <year> nektos`
  headers to 104 `.go` files.
- Pre-existing act lint violations annotated inline with
  `//nolint:<linter> // pre-existing issue from nektos/act`.
  `.golangci.yml` is unchanged vs `main`.
- Makefile test target: `-race -short` (matches forgejo-runner).
- Pre-existing integration test failures fixed: race in parallel executor
  (atomic counters); TestSetupEnv / command_test / expression_test /
  run_context_test updated to match gitea fork runtime; TestJobExecutor and
  TestActionCache gated on `testing.Short()`.

Full `gitea/act` commit history is reachable via the second parent.

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
silverwind
2026-04-22 22:29:06 +02:00
1324 changed files with 294024 additions and 43 deletions
+7
View File
@@ -0,0 +1,7 @@
Copyright 2018 ZEIT, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,112 @@
{
"name": "@vercel/ncc",
"description": "Simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.",
"version": "0.24.1",
"repository": "vercel/ncc",
"license": "MIT",
"main": "./dist/ncc/index.js",
"bin": {
"ncc": "./dist/ncc/cli.js"
},
"scripts": {
"build": "node scripts/build",
"build-test-binary": "cd test/binary && node-gyp rebuild && cp build/Release/hello.node ../integration/hello.node",
"codecov": "codecov",
"test": "node --expose-gc --max_old_space_size=3072 node_modules/.bin/jest",
"test-coverage": "node --expose-gc --max_old_space_size=3072 node_modules/.bin/jest --coverage --globals \"{\\\"coverage\\\":true}\" && codecov",
"prepublish": "yarn build"
},
"devDependencies": {
"@azure/cosmos": "^2.0.5",
"@bugsnag/js": "^5.0.1",
"@ffmpeg-installer/ffmpeg": "^1.0.17",
"@google-cloud/bigquery": "^2.0.1",
"@google-cloud/firestore": "^2.2.0",
"@sentry/node": "^4.3.0",
"@tensorflow/tfjs-node": "^0.3.0",
"@zeit/webpack-asset-relocator-loader": "0.8.0",
"analytics-node": "^3.3.0",
"apollo-server-express": "^2.2.2",
"arg": "^4.1.0",
"auth0": "^2.14.0",
"aws-sdk": "^2.356.0",
"axios": "^0.18.1",
"azure-storage": "^2.10.2",
"browserify-middleware": "^8.1.1",
"bytes": "^3.0.0",
"canvas": "^2.2.0",
"chromeless": "^1.5.2",
"codecov": "^3.6.5",
"consolidate": "^0.15.1",
"copy": "^0.3.2",
"core-js": "^2.5.7",
"cowsay": "^1.3.1",
"esm": "^3.2.22",
"express": "^4.16.4",
"fetch-h2": "^1.0.2",
"firebase": "^6.1.1",
"firebase-admin": "^6.3.0",
"fluent-ffmpeg": "^2.1.2",
"fontkit": "^1.7.7",
"get-folder-size": "^2.0.0",
"glob": "^7.1.3",
"got": "^9.3.2",
"graceful-fs": "^4.1.15",
"graphql": "^14.0.2",
"highlights": "^3.1.1",
"hot-shots": "^5.9.2",
"in-publish": "^2.0.0",
"ioredis": "^4.2.0",
"isomorphic-unfetch": "^3.0.0",
"jest": "^26.3.0",
"jimp": "^0.5.6",
"jugglingdb": "2.0.1",
"koa": "^2.6.2",
"leveldown": "^5.6.0",
"license-webpack-plugin": "^2.3.0",
"lighthouse": "^5.0.0",
"loopback": "^3.24.0",
"mailgun": "^0.5.0",
"mariadb": "^2.0.1-beta",
"memcached": "^2.2.2",
"mkdirp": "^0.5.1",
"mongoose": "^5.3.12",
"mysql": "^2.16.0",
"node-gyp": "^3.8.0",
"npm": "^6.13.4",
"oracledb": "^4.2.0",
"passport": "^0.4.0",
"passport-google-oauth": "^1.0.0",
"path-platform": "^0.11.15",
"pdf2json": "^1.1.8",
"pdfkit": "^0.8.3",
"pg": "^7.6.1",
"pug": "^2.0.3",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"redis": "^2.8.0",
"request": "^2.88.0",
"rxjs": "^6.3.3",
"saslprep": "^1.0.2",
"sequelize": "^5.8.6",
"sharp": "^0.25.2",
"shebang-loader": "^0.0.1",
"socket.io": "^2.2.0",
"source-map-support": "^0.5.9",
"stripe": "^6.15.0",
"swig": "^1.4.2",
"terser": "^3.11.0",
"the-answer": "^1.0.0",
"tiny-json-http": "^7.0.2",
"ts-loader": "^5.3.1",
"tsconfig-paths": "^3.7.0",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"twilio": "^3.23.2",
"typescript": "^3.2.2",
"vm2": "^3.6.6",
"vue": "^2.5.17",
"vue-server-renderer": "^2.5.17",
"webpack": "5.0.0-beta.28",
"when": "^3.7.8"
}
}
+143
View File
@@ -0,0 +1,143 @@
# ncc
[![CI Status](https://github.com/vercel/ncc/workflows/CI/badge.svg)](https://github.com/vercel/ncc/actions?workflow=CI)
[![codecov](https://codecov.io/gh/vercel/ncc/branch/master/graph/badge.svg)](https://codecov.io/gh/vercel/ncc)
Simple CLI for compiling a Node.js module into a single file,
together with all its dependencies, gcc-style.
## Motivation
- Publish minimal packages to npm
- Only ship relevant app code to serverless environments
- Don't waste time configuring bundlers
- Generally faster bootup time and less I/O overhead
- Compiled language-like experience (e.g.: `go`)
## Design goals
- Zero configuration
- TypeScript built-in
- Only supports Node.js programs as input / output
- Support all Node.js patterns and npm modules
## Usage
### Installation
```bash
npm i -g @vercel/ncc
```
### Usage
```bash
$ ncc <cmd> <opts>
```
Eg:
```bash
$ ncc build input.js -o dist
```
Outputs the Node.js compact build of `input.js` into `dist/index.js`.
> Note: If the input file is using a `.cjs` extension, then so will the corresponding output file.
> This is useful for packages that want to use `.js` files as modules in native Node.js using
> a `"type": "module"` in the package.json file.
#### Commands:
```
build <input-file> [opts]
run <input-file> [opts]
cache clean|dir|size
help
version
```
#### Options:
```
-o, --out [file] Output directory for build (defaults to dist)
-m, --minify Minify output
-C, --no-cache Skip build cache population
-s, --source-map Generate source map
--no-source-map-register Skip source-map-register source map support
-e, --external [mod] Skip bundling 'mod'. Can be used many times
-q, --quiet Disable build summaries / non-error outputs
-w, --watch Start a watched build
--v8-cache Emit a build using the v8 compile cache
--license [file] Adds a file containing licensing information to the output
--stats-out [file] Emit webpack stats as json to the specified output file
```
### Execution Testing
For testing and debugging, a file can be built into a temporary directory and executed with full source maps support with the command:
```bash
$ ncc run input.js
```
### With TypeScript
The only requirement is to point `ncc` to `.ts` or `.tsx` files. A `tsconfig.json`
file is necessary. Most likely you want to indicate `es2015` support:
```json
{
"compilerOptions": {
"target": "es2015",
"moduleResolution": "node"
}
}
```
### Package Support
Some packages may need some extra options for ncc support in order to better work with the static analysis.
See [package-support.md](package-support.md) for some common packages and their usage with ncc.
### Programmatically From Node.js
```js
require('@vercel/ncc')('/path/to/input', {
// provide a custom cache path or disable caching
cache: "./custom/cache/path" | false,
// externals to leave as requires of the build
externals: ["externalpackage"],
// directory outside of which never to emit assets
filterAssetBase: process.cwd(), // default
minify: false, // default
sourceMap: false, // default
sourceMapBasePrefix: '../', // default treats sources as output-relative
// when outputting a sourcemap, automatically include
// source-map-support in the output file (increases output by 32kB).
sourceMapRegister: true, // default
watch: false, // default
license: '', // default does not generate a license file
v8cache: false, // default
quiet: false, // default
debugLog: false // default
}).then(({ code, map, assets }) => {
console.log(code);
// Assets is an object of asset file names to { source, permissions, symlinks }
// expected relative to the output code (if any)
})
```
When `watch: true` is set, the build object is not a promise, but has the following signature:
```js
{
// handler re-run on each build completion
// watch errors are reported on "err"
handler (({ err, code, map, assets }) => { ... })
// handler re-run on each rebuild start
rebuild (() => {})
// close the watcher
void close ();
}
```
## Caveats
- Files / assets are relocated based on a [static evaluator](https://github.com/zeit/webpack-asset-relocator-loader#how-it-works). Dynamic non-statically analyzable asset loads may not work out correctly