Zettat123
e6d1f00006
Fix incorrect job result status ( #40 )
...
Fix [#24039(GitHub)](https://github.com/go-gitea/gitea/issues/24039 )
At present, if a job fails in the `Set up job`, the result status of the job will still be `success`. The reason is that the `pre` steps don't call `SetJobError`, so the `jobError` will be nil when `post` steps setting the job result. See 73d7678465/pkg/runner/job_executor.go (L99)
Reviewed-on: https://gitea.com/gitea/act/pulls/40
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-04-14 15:42:03 +08:00
ChristopherHX
2e9189a6e2
fix: ghc assignment typo ( #1729 )
...
* fix: ghc assignment typo
* fixup server_url
2023-04-13 14:09:29 +00:00
ChristopherHX
e71161acde
fix: reusable workflow panic ( #1728 )
...
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-04-13 13:47:59 +00:00
Markus Wolf
8b25ad4dbe
fix: add server_url
attribute to github context ( #1727 )
...
* fix: add `server_url` attribute to github context
The `server_urL` attribute was missing in the `github` context.
Previously it was exposed as environment variable only.
Closes #1726
* fix: also set `api_url` and `graphql_url` attributes
2023-04-13 13:09:28 +00:00
dependabot[bot]
2d6c284491
build(deps): bump megalinter/megalinter from 6.22.1 to 6.22.2 ( #1720 )
...
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter ) from 6.22.1 to 6.22.2.
- [Release notes](https://github.com/megalinter/megalinter/releases )
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/megalinter/megalinter/compare/v6.22.1...v6.22.2 )
---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-04-10 03:50:21 +00:00
Jason Song
73d7678465
Avoid using log.Fatal
in pkg/*
( #39 )
...
Follow https://github.com/nektos/act/pull/1705
Reviewed-on: https://gitea.com/gitea/act/pulls/39
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-committed-by: Jason Song <i@wolfogre.com>
2023-04-07 16:31:03 +08:00
Zettat123
eef897b208
Add token for getting reusable workflows from local private repos ( #38 )
...
Partially fixes https://gitea.com/gitea/act_runner/issues/91
If the repository is private, we need to provide the token to the caller workflows to access the called reusable workflows from the same repository.
Reviewed-on: https://gitea.com/gitea/act/pulls/38
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-04-06 14:16:20 +08:00
Zettat123
ab8000b05e
Add With
field to jobparser.Job
( #37 )
...
Partially Fixes [gitea/act_runner#91 comment](https://gitea.com/gitea/act_runner/issues/91#issuecomment-734544 )
nektos/act has added `With` to support reusable workflows (see [code](68c72b9a51/pkg/model/workflow.go (L160)
))
GitHub actions also support [`jobs.<job_id>.with`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idwith )
Reviewed-on: https://gitea.com/gitea/act/pulls/37
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-04-04 10:59:53 +08:00
dependabot[bot]
3f8942c62d
build(deps): bump megalinter/megalinter from 6.21.0 to 6.22.1 ( #1710 )
...
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter ) from 6.21.0 to 6.22.1.
- [Release notes](https://github.com/megalinter/megalinter/releases )
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/megalinter/megalinter/compare/v6.21.0...v6.22.1 )
---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 03:13:25 +00:00
Jason Song
1dcd52ba08
feat: improve GetOutboundIP ( #1707 )
...
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-31 13:28:08 +00:00
Jason Song
92da209c98
fix: use os.UserHomeDir ( #1706 )
...
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-31 13:08:46 +00:00
Zettat123
1c9e2c8b90
Support reusable workflow ( #34 )
...
Fix https://gitea.com/gitea/act_runner/issues/80
Fix https://gitea.com/gitea/act_runner/issues/85
To support reusable workflows, I made some improvements:
- read `yml` files from both `.gitea/workflows` and `.github/workflows`
- clone repository for local reusable workflows because the runner doesn't have the code in its local directory
- fix the incorrect clone url like `https://https://gitea.com `
Co-authored-by: Jason Song <i@wolfogre.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/34
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-03-29 13:59:22 +08:00
Jason Song
393399bc0f
Expose SetJob to make EraseNeeds work ( #35 )
...
Related to #33
Reviewed-on: https://gitea.com/gitea/act/pulls/35
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-29 13:57:29 +08:00
Kris
bd27c853b1
Make sure working directory is respected when configured from matrix ( #1686 )
...
* Make sure working directory is respected when configured from matrix
* Fix regression by setting Workingdirectory on stepRun instead of step or too early
2023-03-28 12:24:03 +00:00
Jason Song
3ee0773e61
Keep the order of jobs in the workflow file when parsing ( #33 )
...
Keep the order of jobs in the workflow file when parsing, and it will make it possible for Gitea to show jobs in the original order on UI.
Reviewed-on: https://gitea.com/gitea/act/pulls/33
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-28 11:38:40 +08:00
Jason Song
22e7c2d863
Revert "Erase needs of job in SingleWorkflow ( #9 )" ( #32 )
...
This reverts commit 54d3c0b84c
.
`EraseNeeds` Shouldn't be used in `jobparser.Parse`, it's for 023e61e678/models/actions/run.go (L200)
Or Gitea won't be able to get `Needs` of jobs.
Reviewed-on: https://gitea.com/gitea/act/pulls/32
Reviewed-by: Zettat123 <zettat123@noreply.gitea.io>
2023-03-27 17:46:50 +08:00
dependabot[bot]
d0a5194266
build(deps): bump actions/stale from 7 to 8 ( #1700 )
...
Bumps [actions/stale](https://github.com/actions/stale ) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases )
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/stale/compare/v7...v8 )
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-27 03:29:53 +00:00
dependabot[bot]
114db8e32c
build(deps): bump megalinter/megalinter from 6.20.1 to 6.21.0 ( #1699 )
...
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter ) from 6.20.1 to 6.21.0.
- [Release notes](https://github.com/megalinter/megalinter/releases )
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/megalinter/megalinter/compare/v6.20.1...v6.21.0 )
---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 03:13:54 +00:00
Bo-Yi.Wu
4ed05ffe9f
chore: update go-git dependency in go.mod ( #30 )
...
- Replace `go-git` with a forked version in `go.mod`
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/30
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
Co-committed-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-03-26 21:27:19 +08:00
Lunny Xiao
11027392cf
Fix bug ( #31 )
...
Reviewed-on: https://gitea.com/gitea/act/pulls/31
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-26 21:01:46 +08:00
Zettat123
e00cb13dec
chore(yaml): Improve ParseRawOn
( #28 )
...
See [act_runner #71 comment](https://gitea.com/gitea/act_runner/issues/71#issuecomment-733806 ), we need to handle `nil interface{}` in `ParseRawOn` function
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/28
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-03-25 12:13:50 +08:00
Lunny Xiao
674dcf6006
ParseRawOn support schedules ( #29 )
...
Fix gitea/act_runner#71
Reviewed-on: https://gitea.com/gitea/act/pulls/29
Reviewed-by: Jason Song <i@wolfogre.com>
Reviewed-by: Zettat123 <zettat123@noreply.gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-24 20:15:46 +08:00
Jason Song
f823f12503
Support gitea context ( #27 )
...
And we will be able to use context like `${{ gitea.repository }}` in workflows yaml files, it's same as `${{ github.repository }}`
Reviewed-on: https://gitea.com/gitea/act/pulls/27
Reviewed-by: Zettat123 <zettat123@noreply.gitea.io>
2023-03-23 12:14:28 +08:00
Zettat123
646206bd8a
Add extra path env for running go actions ( #26 )
...
At present, the runner can't run go actions even if the go environment has been set by the `setup-go` action. The reason is that `setup-go` will add the go related paths to [`GITHUB_PATH`](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path ) but in #22 I forgot to apply them before running go actions. After adding the `ApplyExtraPath` function, the `setup-go` action runs properly.
Reviewed-on: https://gitea.com/gitea/act/pulls/26
Reviewed-by: Jason Song <i@wolfogre.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-03-21 15:31:30 +08:00
dependabot[bot]
cbaa7fb49a
build(deps): bump actions/setup-go from 3 to 4 ( #1689 )
...
Bumps [actions/setup-go](https://github.com/actions/setup-go ) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases )
- [Commits](https://github.com/actions/setup-go/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/setup-go
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-20 03:31:00 +00:00
dependabot[bot]
0207edafaa
build(deps): bump megalinter/megalinter from 6.20.0 to 6.20.1 ( #1679 )
...
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter ) from 6.20.0 to 6.20.1.
- [Release notes](https://github.com/megalinter/megalinter/releases )
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/megalinter/megalinter/compare/v6.20.0...v6.20.1 )
---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-19 23:37:58 +00:00
dependabot[bot]
9419713cf3
build(deps): bump fregante/setup-git-user from 1 to 2 ( #1664 )
...
Bumps [fregante/setup-git-user](https://github.com/fregante/setup-git-user ) from 1 to 2.
- [Release notes](https://github.com/fregante/setup-git-user/releases )
- [Commits](https://github.com/fregante/setup-git-user/compare/v1...v2 )
---
updated-dependencies:
- dependency-name: fregante/setup-git-user
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-19 23:21:57 +00:00
Shubh Bapna
b7905c0a84
feat: specify matrix on command line ( #1675 )
...
* added matrix option
* select the correct subset of matrix configuration after producing all the matrix configuration
* add tests
* update readme
* lint fix
* remove matrix from readme
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-19 17:25:55 +00:00
a1012112796
1e38a8b085
make sure special logs be sent to gitea's server ( #25 )
...
example:
https://gitea.com/a1012112796/test_action/actions/runs/7

TODO: special handle them on ui
Signed-off-by: a1012112796 <1012112796@qq.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/25
Reviewed-by: Jason Song <i@wolfogre.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-committed-by: a1012112796 <1012112796@qq.com>
2023-03-17 23:01:31 +08:00
Jason Song
81d6e16054
Fix incompatibility caused by tracking upstream add actions to test it ( #24 )
...
Reviewed-on: https://gitea.com/gitea/act/pulls/24
2023-03-16 15:00:11 +08:00
Jason Song
2b594e229d
Merge tag 'nektos/v0.2.43'
...
Conflicts:
pkg/container/docker_run.go
pkg/runner/action.go
pkg/runner/logger.go
pkg/runner/run_context.go
pkg/runner/runner.go
pkg/runner/step_action_remote_test.go
2023-03-16 11:45:29 +08:00
Shubham Agrawal
6f6aad9a9b
Support for docker steps in host environment ( #1674 )
...
* Support for docker steps in host environment
* removed workdir changes
2023-03-14 14:07:31 +00:00
Zettat123
065f429a53
Improve running with go ( #22 )
...
Close #21
I have tested this PR and run Go actions successfully on:
- Windows host
- Docker on Windows
- Linux host
- Docker on Linux
Before running Go actions, we need to make sure that Go has been installed on the host or the Docker image.
Reviewed-on: https://gitea.com/gitea/act/pulls/22
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-committed-by: Zettat123 <zettat123@gmail.com>
2023-03-14 16:55:36 +08:00
Markus Wolf
8d098545de
fix: correct ref and ref_name ( #1672 )
...
* fix: correct ref and ref_name
The ref in the GitHub context is always full qualified
(e.g. refs/heads/branch, refs/tags/v1).
The ref_name is the ref with the strippep prefix.
In case of pull_requests, this is the merge commit ref
(e.g. refs/pull/123/merge -> 123/merge).
* test: update test data
2023-03-09 20:03:13 +00:00
Zettat123
95e700e85d
Fix missing ActionRunsUsingGo
( #20 )
...
- Allow `using: "go"` when unmarshalling YAML.
- Add `ActionRunsUsingGo` to returned errors.
Co-authored-by: Zettat123 <zettat123@gmail.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/20
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Zettat123 <zettat123@noreply.gitea.io>
Co-committed-by: Zettat123 <zettat123@noreply.gitea.io>
2023-03-09 22:51:58 +08:00
Jason Song
e29fd4cac7
fix: return err in walk ( #1667 )
...
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-08 15:13:11 +00:00
ChristopherHX
b2784e3104
test: Enshure ForcePull config doesn't break docker actions (1661)
2023-03-08 14:57:49 +00:00
ChristopherHX
073d205547
fix: crash if the id tool fails to run in the container (1660)
2023-03-08 14:41:25 +00:00
a1012112796
daa102e5cc
make log level configable ( #19 )
...
relatd: https://gitea.com/gitea/act_runner/pulls/39
Reviewed-on: https://gitea.com/gitea/act/pulls/19
Reviewed-by: Jason Song <i@wolfogre.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-committed-by: a1012112796 <1012112796@qq.com>
2023-03-08 14:46:39 +08:00
dependabot[bot]
554522b044
build(deps): bump megalinter/megalinter from 6.19.0 to 6.20.0 ( #1665 )
...
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter ) from 6.19.0 to 6.20.0.
- [Release notes](https://github.com/megalinter/megalinter/releases )
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md )
- [Commits](https://github.com/megalinter/megalinter/compare/v6.19.0...v6.20.0 )
---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-06 03:30:59 +00:00
Tony Soloveyv
5b7fb3fb22
Improve XDG Spec supporting ( #1656 )
...
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-03 14:39:02 +00:00
Jason Song
d8ea1eb236
fix: safe file name ( #1651 )
...
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-03-03 08:38:33 +00:00
Alex Savchuk
1f1adbac3d
fix: compare properties of Invalid types ( #1645 )
...
* fix: compare properties of Invalid types
fix: compare properties of Invalid types #1643
* fix linter problem
* Fix review comment
2023-03-03 08:16:33 +00:00
Alex Savchuk
33b4484fcd
fix: github.job property is empty, GITHUB_JOB should be job id ( #1646 )
...
* fix: github.job property is empty, GITHUB_JOB should be job id
fix: github.job property is empty #1621
fix: GITHUB_JOB should be the id not the name #1473
* fix linter problem.
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-02-27 19:10:31 +00:00
Jason Song
28bc9e893c
Replace more strings.ReplaceAll
to safeFilename
( #18 )
...
Follow #16 #17
Reviewed-on: https://gitea.com/gitea/act/pulls/18
2023-02-24 14:20:34 +08:00
Jason Song
1cd3b6d763
Replace more strings.ReplaceAll
to safeFilename
( #17 )
...
Follow #16 .
Reviewed-on: https://gitea.com/gitea/act/pulls/17
2023-02-24 12:11:30 +08:00
Jason Song
ab84d306ad
Safe filename ( #16 )
...
Fix #15 .
Reviewed-on: https://gitea.com/gitea/act/pulls/16
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-committed-by: Jason Song <i@wolfogre.com>
2023-02-24 10:17:36 +08:00
Markus Wolf
943f347327
fix: update output handling for reusable workflows ( #1521 )
...
* fix: map job output for reusable workflows
This fixes the job outputs for reusable workflows. There is
a required indirection. Before this we took the outputs from
all jobs which is not what users express with the workflow
outputs.
* fix: remove double evaluation
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-02-23 22:34:47 +00:00
ChristopherHX
606fd4bde1
fix: crash malformed composite action ( #1616 )
...
* fix: crash malformed composite action
* Add remote composite action test
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-02-23 22:16:07 +00:00
ChristopherHX
75baa9dc3b
feat: workflowpattern package ( #1618 )
...
* feat: workflowpattern package
* nolint:gocyclo
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-02-23 18:21:08 +00:00