Commit Graph

532 Commits

Author SHA1 Message Date
ChristopherHX
61396d8085 fix: use ubuntu-latest bookworm instead of buster for tests (#5884)
* buster is now end of life
* apt-get update fails for some tests using ubuntu-latest
* buster cdn moved to archived domain
2025-07-25 20:33:59 +00:00
Ryan Fleet
0bc47aea68 added info log when container image platform mismatched (#3225)
* added info log when container image platform mismatched

* inline image architecture comparison into ImageExistsLocally function as per review request
2025-06-19 21:37:15 +00:00
ChristopherHX
7c7b383c10 fix: post step failure is job failure (#5297)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-06-13 16:53:18 +00:00
ChristopherHX
515dd6612c feat: allow workflow description (#5326)
Otherwise act would reject such workflows right away
2025-06-13 16:33:10 +00:00
ChristopherHX
4ba1c2bde6 feat: --validate and --strict (#2717)
* feat: `--validate` and `--strict`

* fix missing changes

* add test for strict validate

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-06-11 22:02:16 +00:00
ChristopherHX
d8506bfa4f fix: valueMasker concurrent map write (#5026)
* valueMasker create secrets copy

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-06-11 18:06:25 +00:00
ChristopherHX
67e332e838 fix: GITHUB_ENV and GITHUB_OUTPUT allow larger lines (#5028) 2025-06-11 17:36:11 +00:00
dependabot[bot]
1622c218d5 build(deps): bump the dependencies group across 1 directory with 5 updates (#4986)
* build(deps): bump the dependencies group across 1 directory with 5 updates

Bumps the dependencies group with 4 updates in the / directory: [github.com/docker/cli](https://github.com/docker/cli), [github.com/docker/docker](https://github.com/docker/docker), [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) and [dario.cat/mergo](https://github.com/imdario/mergo).


Updates `github.com/docker/cli` from 28.0.4+incompatible to 28.2.2+incompatible
- [Commits](https://github.com/docker/cli/compare/v28.0.4...v28.2.2)

Updates `github.com/docker/docker` from 28.0.4+incompatible to 28.2.2+incompatible
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v28.0.4...v28.2.2)

Updates `github.com/go-git/go-git/v5` from 5.14.0 to 5.16.0
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.14.0...v5.16.0)

Updates `golang.org/x/term` from 0.30.0 to 0.31.0
- [Commits](https://github.com/golang/term/compare/v0.30.0...v0.31.0)

Updates `dario.cat/mergo` from 1.0.1 to 1.0.2
- [Release notes](https://github.com/imdario/mergo/releases)
- [Commits](https://github.com/imdario/mergo/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-version: 28.2.2+incompatible
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github.com/docker/docker
  dependency-version: 28.2.2+incompatible
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github.com/go-git/go-git/v5
  dependency-version: 5.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: golang.org/x/term
  dependency-version: 0.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: dario.cat/mergo
  dependency-version: 1.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): Migrate docker api usage

* do not use deprecated types / functions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-06-02 17:09:58 +00:00
ChristopherHX
1154f0d984 feat: log parsed commands and step summary (#2761)
* feat: log parsed command data in json logger

* Could be used to upload the GITHUB_STEP_SUMMARY by downstream Projects
* You can see the summary and other commands
* Access the raw line of most commands

* Update step.go

* Update step.go

* Update push.yml

* .

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-06-01 21:30:40 +00:00
Josh Soref
a8ac529344 fix: wrap subpath in '' (#2754) (#2755)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Jakub Panek <me@panekj.dev>
2025-05-23 08:46:05 +00:00
Bengt Brodersen
16b86a64a9 feat: add cli option to set concurrent jobs count (#2762)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-05-23 08:05:42 +00:00
Josh Soref
b5469ac4ca fix: add missing punctuation to error report (#2752) (#2753)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-05-23 06:42:27 +00:00
Peli de Halleux
bd4bc99ec4 feat: add models permission level for AI inference responses (#2767)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-05-22 21:57:52 +00:00
ChristopherHX
8a18fb08ad chore(ci): disable invalid test case (#2875)
* chore(ci): disable invalid test case

* GitHub Hosted Runners `sh` no longer identifies itself as `bash`

* fix indent
2025-05-22 20:53:07 +00:00
ChristopherHX
bea04dd8f9 feat: Support graceful job step cancellation (#2714)
* feat: Support graceful job step cancellation

* for gh-act-runner
* act-cli support as well
* respecting always() and cancelled() of steps

* change main

* cancel startContainer / gh cli / bugreport early

* add to watch as well

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-03-29 17:00:37 +00:00
ChristopherHX
517c3ac467 fix: reporting fetch failure as job error and log the error (#2715)
E.g. if GoGitAction Cache had a fetch failure this error did not trigger report jobResult Failure.

Also the error has been not printed until the last message before exit of act.

* adds tests for both corner cases
2025-03-29 16:41:42 +00:00
Paolo Tagliaferri
0098044d76 Report the elapsed time for each workflow step (#2700)
* Report the elapsed time for each workflow step

The `runStepExecutor` was extended to track and report the execution time of the step.

This applies both to the standard and JSON log format.

Please, note that:
- on the standard log the time format depends on the value (e.g. `3.038334954s` or `2m0.054014069s`)
- on the JSON log the time format is nanoseconds

* Added the `executionTime` report also to failing steps
2025-03-18 12:51:53 +00:00
Zoupers Zou
49710c8504 fixes #2689 Make the external url of cache server configurable if necessary (#2690)
* Make the external url of cache server configurable if necessary

Signed-off-by: Zoupers <qy@zouper.cn>

* optimize code and doc and fix test and add test

Signed-off-by: Zoupers <qy@zouper.cn>

* optimize code and adjust description

Signed-off-by: Zoupers <qy@zouper.cn>

---------

Signed-off-by: Zoupers <qy@zouper.cn>
Co-authored-by: 林玮 (Jade Lin) <linw1995@icloud.com>
2025-03-05 00:04:23 +00:00
dependabot[bot]
34144c25ab build(deps): bump the dependencies group with 6 updates (#2675)
* build(deps): bump the dependencies group with 6 updates

Bumps the dependencies group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/docker/cli](https://github.com/docker/cli) | `27.5.1+incompatible` | `28.0.0+incompatible` |
| [github.com/docker/docker](https://github.com/docker/docker) | `27.4.1+incompatible` | `28.0.0+incompatible` |
| [github.com/go-git/go-billy/v5](https://github.com/go-git/go-billy) | `5.6.1` | `5.6.2` |
| [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) | `5.13.1` | `5.13.2` |
| [golang.org/x/term](https://github.com/golang/term) | `0.28.0` | `0.29.0` |
| google.golang.org/protobuf | `1.36.4` | `1.36.5` |


Updates `github.com/docker/cli` from 27.5.1+incompatible to 28.0.0+incompatible
- [Commits](https://github.com/docker/cli/compare/v27.5.1...v28.0.0)

Updates `github.com/docker/docker` from 27.4.1+incompatible to 28.0.0+incompatible
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v27.4.1...v28.0.0)

Updates `github.com/go-git/go-billy/v5` from 5.6.1 to 5.6.2
- [Release notes](https://github.com/go-git/go-billy/releases)
- [Commits](https://github.com/go-git/go-billy/compare/v5.6.1...v5.6.2)

Updates `github.com/go-git/go-git/v5` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.13.1...v5.13.2)

Updates `golang.org/x/term` from 0.28.0 to 0.29.0
- [Commits](https://github.com/golang/term/compare/v0.28.0...v0.29.0)

Updates `google.golang.org/protobuf` from 1.36.4 to 1.36.5

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: github.com/go-git/go-billy/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: github.com/go-git/go-git/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* Migrate docker pkg to next release

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-authored-by: Casey Lee <cplee@nektos.com>
2025-02-25 09:28:30 +00:00
Steven Edwards
c6a7754910 Disable "unable to get git repo" when none exists. (#2495)
* Disable "unable to get git repo" when none exists.

* Restore error back so it's included in bug reports

Change from Warningf to Debugf.

---------

Co-authored-by: Casey Lee <cplee@nektos.com>
2025-02-25 06:00:38 +00:00
ChristopherHX
cf09fd0af1 fix: use non strict schema to allow some undefined behavior (#2524)
* fix: use non strict schema to allow some undefined behavior

* GitHub Actions doesn't use the newer strict schema in the service
* Tolerate more hallucinations

* Update workflow.go

* Update workflow.go

* Update pkg/model/workflow.go

Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

---------

Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-02-25 02:45:49 +00:00
ChristopherHX
95e411da06 fix: remote docker actions new action cache and dry run mode (#2513)
* fixes

* Add TestDockerCopyTarStreamDryRun

* increase coverage a bit

* fixup

* fixup

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-02-25 02:28:17 +00:00
ChristopherHX
16bdce5f1f feat: GoGitActionCache shallow fetch (#2677)
* speed up cloning iff feature flag is on, should not have any negative impact
2025-02-22 14:29:03 +00:00
ChristopherHX
cb26fd8670 Use gh auth token for default GITHUB_TOKEN secret (#2651)
* initial version
2025-02-09 03:24:32 +00:00
Steven Edwards
51147d452a Incorporate Debug, Warn, Error logging. (#2490) 2025-02-08 11:19:05 -08:00
ChristopherHX
60a499da93 refactor logger (#2552) 2025-02-08 11:18:08 -08:00
ChristopherHX
be51601734 parse_env_file discard utf8 bom (#2638)
* parse_env_file discard utf8 bom

* powershell 5 may add the BOM even when explicitly using utf8

* add test + apply to GITHUB_PATH as well

* fix it

* fix powershel 5 syntax

* misc

* fixup

* fix wrong subaction

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-02-01 18:17:25 +00:00
m1r4c
9dd0854a67 Added support for dereferenced map properties (#2635)
* Added support for dereferenced properties

* Added negative test

* Update pkg/exprparser/functions_test.go

Co-authored-by: ChristopherHX <christopher.homberger@web.de>

* Update pkg/exprparser/functions_test.go

Co-authored-by: ChristopherHX <christopher.homberger@web.de>

* fix lint

---------

Co-authored-by: m1r4c <lars-github@domesjo.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2025-01-31 19:14:24 +00:00
S. M. Mahmudul Haque (Yamin)
deea8ec8c6 fix: prevent unintended input replacement in reusable workflows with workflow_dispatch when using workflow_call (#2502)
* Remove redundant check

See: https://github.com/nektos/act/issues/2464#issuecomment-2430903650

* Add condition to prevent replacing inputs in reusable workflows with workflow_dispatch inputs

Closes: https://github.com/nektos/act/issues/2464

* fmt

* Revert "Remove redundant check"

This reverts commit 63455960ec714eea7631a586bcd59bed449739fc.

* add test

* Update runner_test.go

* update label

---------

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2024-12-29 14:52:06 +00:00
ChristopherHX
b4ef6fb482 fix: short sha has at least four digits (#2540)
Currently it is not very unlikly to have a false match for tag `0` with sha `0XXXXXXXXXXXXXXXXXXXXXXX`, 1 to 16

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-12-24 21:33:13 +00:00
Casey Lee
7172fc31d1 chore: upgrade dependencies (#2589)
* chore: upgrade dependencies

* fix: linter errors

* chore: bump version of golangci-lint

* chore: go mod tidy

* fix: failing test

* fix: update version of upload-artifact to v4

* chore: format test output with gotestfmt

* fix: typo in test exec

* fix: failing tests

* fix: windows unit test execution

* fix: windows unit test execution

* fix: whitespace
2024-12-24 13:12:24 -08:00
derrik
e6b5062e5c fix: amd64 arch to X64 (#2580) 2024-12-24 08:56:52 -08:00
ChristopherHX
e3b4e3aded add test for listartifacts v4 filter (#2507)
* add test for listartifacts v4 filter

* fixes a defect of last change

* Update artifacts.yml

* use 32bit ids after cast to double we have a loss

* Update artifacts.yml
2024-10-29 02:34:58 +00:00
ChristopherHX
2c0e3fea00 fix: tests with validation errors were skipped (#2496)
* fix: tests with validation errors were skipped

* fixup

* [no ci] fix one test

* fix some tests

* fix last test

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-10-28 04:03:42 +00:00
ChristopherHX
f77a443edf fix: merge-multiple artifacts were broken (#2505)
* fix: merge-multiple artifacts were broken

* Update arifacts_v4.go

* Update arifacts_v4.go

* update id of delete artifact reqest

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-10-28 03:45:20 +00:00
ChristopherHX
9142ed9bf7 feat: improve new action cache logging (#2474)
* feat: improve new action cache logging

* Test logging failure cases

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-10-10 03:07:55 +00:00
ChristopherHX
5ffec84f8d fix: if condition in composite action misbehaves (#2473)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-10-10 02:52:09 +00:00
Ryan
a34d9c6d60 run_context: add GITHUB_RUN_ATTEMPT (#2458)
* run_context: add GITHUB_RUN_ATTEMPT

Fixes https://github.com/nektos/act/issues/2451
Fixes https://github.com/nektos/act/issues/1615

* fix whitespace

* fix githubcontext

* fix TestSetupEnv

---------

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-09-19 21:36:09 +00:00
sebastien-perpignane
2e117a4d2b bug/issue #2448 - manage special bash options when no shell is defined (#2449)
* bash without "-o pipefail" option when "bash" is not explicitely
defined in the workflow
* bonus: fix inverted expected and actual in TestGetGitHubContext assertions
2024-09-19 08:28:45 +00:00
ChristopherHX
41430177a2 fix: schema validation for job if functions (#2446)
* fix: schema validation for job if functions

* Add Tests

* Update pkg/schema/schema.go

Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* Update pkg/schema/schema.go

---------

Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2024-09-10 11:14:47 -07:00
ChristopherHX
32b6bb7a25 fix: artifact v4 upload above 8MB (#2402)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-09-07 23:01:50 +00:00
benniekiss
60a2fed37b fix GOOS parsing to match expected GHA RUNNER_OS values (#2422)
github actions reports RUNNER_OS for linux and windows with capital letters (Linux, Windows). This should increase compatibility when runner uses `-self-hosted`

Co-authored-by: Jason Song <i@wolfogre.com>
2024-08-13 17:33:47 +00:00
ChristopherHX
102e6cbce0 feat: Validate GitHub Actions schema (#2416)
* feat: Validate GitHub Actions schema

**BREAKING** previously accepted workflows are now invalid

* update code

* fix tests

* Bump docker / fix lint

* fix test action due to moving the file

* remove unused function

* fix parsing additional functions

* fix allow int

* update docker dep, due to linter
2024-08-13 03:40:21 +00:00
Chongyi Zheng
a62063b73f Bump mergo to v1.0.0 with new module URL (#2403)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-07-24 10:12:40 +00:00
Andrii Chyrva
570ccf390e Fix #2363. Add /pre- and /post-entrypoint handling (#2394)
* Fix #2363. Add /pre- and /post-entrypoint handling

* fix copy paste error

---------

Co-authored-by: Andrii Chyrva <achyrva@hotmail.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2024-07-24 07:41:33 +00:00
ChristopherHX
3c7eda7f3e fix: docker stub and add a test for this (#2355)
* fix: docker stub

* test if you can build run without docker

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-07-10 16:45:07 +00:00
ChristopherHX
6de25a53bc fix: make node tool non volatile (#2372)
* fix: make node tool non volatile

Currently downgrading node via setup-node can break later actions

* fix it and lookup on startup

* fix problems

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-07-10 15:58:37 +00:00
ChristopherHX
2ad5ff74f8 fix: add missing service container health check (#2354)
* fix: Implement missing health ceck for Services

* Add test case

* linter doesn't support min builtin and fix check

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-07-10 15:33:54 +00:00
Louis Auzuret
e4607fc791 fix: skip service container for empty image (#2281)
* fix: skip service container for empty image

It is used to skip empty image name in services which is the only way to handle condition services in github action currently https://github.com/actions/runner/issues/822

* test: add testdata for empty image in services

* fix: add missing test call

* fix: wring test call

* fix: invalid without expression

---------

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2024-06-05 19:16:34 +00:00
ChristopherHX
b5ad3c4acd fix: composite action input pollution (#2348)
* fix: composite action input pollution

* fix run steps

* fix missing defaults in post after env cleanup

* fix test to make more sense

* Add tests and simplify change

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-06-05 14:44:44 +00:00