1
0
mirror of https://code.forgejo.org/forgejo/act.git synced 2025-04-19 08:22:16 +03:00

1312 Commits

Author SHA1 Message Date
Michael Kriese
af28212d70
Merge pull request 'PR#3. Reducing the delta between Nektos/Act and Forgejo/Act' (#117) from achyrva/act:nektos-into-forgejo-0 into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/117
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-04-16 10:54:47 +00:00
ChristopherHX
b1bd307c21 refactor: simpilfy go-git cache (#2208) 2025-04-12 14:03:12 +00:00
ChristopherHX
613090ecd7 feat: offline mode for new action cache (#2173)
* Try fetch update of the action, otherwise use cached version

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2025-04-12 14:03:12 +00:00
earl-warren
ba471c1ecf
Merge pull request 'fix(git): add support for parsing weirder remote URLs' (#115) from 0x5f/act:fix-weird-remote-urls into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/115
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-04-01 21:31:24 +00:00
_
790f168a1a fix(git): add support for parsing weirder remote URLs 2025-03-31 23:45:06 -07:00
_
9fee14af26 fix(tests): explicitly set git-config user.name/user.email to avoid spurious test failures 2025-03-31 23:45:06 -07:00
benniekiss
2c49c3a4a7
fix GOOS parsing to match expected GHA RUNNER_OS values (#106)
This PR is a carryover from [upstream](https://github.com/nektos/act/pull/2422):

> github actions reports RUNNER_OS for linux and windows with [capital letters](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/variables#default-environment-variables) (Linux, Windows). This should increase compatibility when runner uses `-self-hosted`
>
> Currently, when workflows are run within containers, RUNNER_OS is [hardcoded](https://code.forgejo.org/forgejo/act/search/branch/main?path=&q=RUNNER_OS&mode=exact) to `Linux` correctly, so this will make RUNNER_OS more consistent.

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/106
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: benniekiss <benniekiss@noreply.code.forgejo.org>
Co-committed-by: benniekiss <benniekiss@noreply.code.forgejo.org>
2025-03-31 07:52:49 +00:00
Kwonunn
589cb9fea9 Merge pull request 'fix: reduce the time during which the database stays open' (#109) from earl-warren/act:wip-proxy-lock into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/109
Reviewed-by: Kwonunn <kwonunn@noreply.code.forgejo.org>
v1.25.1
2025-03-24 19:31:09 +00:00
Kwonunn
c51c6ab2bc fix: move reading cache to separate function 2025-03-24 10:48:28 +01:00
Kwonunn
e741fd2145 fix: do not immediately close the db after opening it 2025-03-24 10:17:04 +01:00
Earl Warren
e3b67f8794
fix: reduce the time during which the database stays open
* During get/upload, close the database while reading/writing so
  it does not stay open for longer than necessary. This may be helpful
  when uploads run in parallel.
* Be more informative when returning error 500
* Make useCache handle errors
* Return 500 immediately when writing the cache fails instead of falling
  through to 200

Refs: https://code.forgejo.org/forgejo/runner/issues/509
2025-03-23 23:25:09 +01:00
Kwonunn
110b6bd72c Merge pull request 'Fix security issues with cache by proxying access' (#107) from Kwonunn/act:fix/cache-proxy into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/107
v1.25.0
2025-03-21 14:19:38 +00:00
Kwonunn
0391b0c951 review: Gusted review 2025-03-21 13:45:51 +00:00
Kwonunn
e89531735a return 404 when not found 2025-03-21 13:45:51 +00:00
Kwonunn
44e4336cb7 set external url header 2025-03-21 13:45:51 +00:00
Kwonunn
00f870133b fix tests for cache proxy 2025-03-21 13:45:51 +00:00
Kwonunn
45e53b4a2f fix: external url and mac function matching 2025-03-21 13:45:51 +00:00
Kwonunn
c6c5ef83fb add unit tests for mac calculation 2025-03-21 13:45:51 +00:00
Kwonunn
bd1849372b review: add retries to generating runid in case of collision 2025-03-21 13:45:51 +00:00
Kwonunn
9275b68fb4 review: fix various issues brought up by Gusted 2025-03-21 13:45:51 +00:00
Kwonunn
2814377563 review: discard params in clean 2025-03-21 13:45:51 +00:00
Kwonunn
8a2a2ed496 return 403 instead of 500 when not authorized correctly 2025-03-21 13:45:51 +00:00
Kwonunn
b4d524afa6 functional save and restore through proxy 2025-03-21 13:45:51 +00:00
Kwonunn
d77d8f4578 integrate the new cache proxy with the server viceice set up 2025-03-21 13:45:51 +00:00
Kwonunn
471830223f use safe sync.Map 2025-03-21 13:45:51 +00:00
Kwonunn
3b504ece2d add copyright notice 2025-03-21 13:45:51 +00:00
Kwonunn
40b398d8a4 rename workflowid to runid 2025-03-21 13:45:51 +00:00
Kwonunn
35cdfb6d8e update the reverse proxy to read workflow id and inject new auth info 2025-03-21 13:45:51 +00:00
Kwonunn
5676550b55 add CreateWorkflowData 2025-03-21 13:45:51 +00:00
Kwonunn
5afd6ee4fe wip: begin implementation of new design in proxy 2025-03-21 13:45:51 +00:00
Kwonunn
c95f5f6608 fix cache proxy to work properly 2025-03-21 13:45:51 +00:00
Kwonunn
1d5978b19e implement proxy server 2025-03-21 13:45:51 +00:00
Kwonunn
45f0b9bb12 implement hmac generation 2025-03-21 13:45:51 +00:00
Kwonunn
383bf98efc create cache proxy based on cache server 2025-03-21 13:45:51 +00:00
Michael Kriese
954af553c8 fix: join org and repo 2025-03-21 13:45:51 +00:00
Michael Kriese
a6fd53b23e fix: validate timestamp 2025-03-21 13:45:51 +00:00
Michael Kriese
21b1cb26af fix: partial secure cache 2025-03-21 13:45:51 +00:00
earl-warren
559904cc73
Merge pull request 'fix: it is ok for the toolchain to be higher than the required version [skip cascade]' (#108) from earl-warren/act:wip-go into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/108
Reviewed-by: Kwonunn <kwonunn@noreply.code.forgejo.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-03-21 13:43:55 +00:00
Earl Warren
a910e74bb3
fix: it is ok for the toolchain to be higher than the required version 2025-03-21 14:28:03 +01:00
Earl Warren
8517e5060f
chore(ci): skip cascade if [skip cascade] is found in the PR title (#105)
## Testing

This is a copy/paste of an existing pull request verified to work
https://code.forgejo.org/forgejo/runner/pulls/476

## Description

When there are multiple PRs in flight, using a var to disable the
cascading PR that eventually runs the end to end tests (for instance
because the change is about examples) is error prone.

Allowing each pull request to indivudually decide when it is relevant
or not is more practical and fine grain.

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/105
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-01-30 21:12:16 +00:00
earl-warren
9bbb2d6518
Merge pull request 'fix: ensure the LXC template does not have obsolete APT' (#102) from earl-warren/act:wip-apt-old into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/102
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
v1.24.1
2025-01-29 10:02:37 +00:00
Earl Warren
4b0aa114c6
fix: ensure the LXC template does not have obsolete APT
Upgrade to lxc-helper 1.0.1
2025-01-29 10:30:14 +01:00
Earl Warren
0af856b8d5
chore(upgrade): sync lxc-helpers v1.0.3 2025-01-29 10:30:12 +01:00
Michael Kriese
3b027f1331
fix(jobparser): support workflow_call.inputs and workflow_call.outputs (#70)
- Closes #69
- #45
- https://codeberg.org/forgejo/forgejo/issues/6069

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/70
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
2025-01-29 08:38:30 +00:00
earl-warren
bf409b9f7f
Merge pull request 'fix(tests): binds are not sorted' (#97) from earl-warren/act:wip-test into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/97
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-23 16:45:52 +00:00
Earl Warren
388ffafdb7
fix(tests): binds are not sorted
That creates false negative in test runs. Just keep one, there is no
value in having more.
2025-01-22 22:24:27 +01:00
Earl Warren
bb61fe1b35
feat: --hostname is allowed in container options (#95)
It is useful to set an alternative hostname when running a service
such as:

```yaml
services:
  minio:
    image: data.forgejo.org/oci/bitnami/minio:2024.8.17
    options: >-
      --hostname alternate.minio
```

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/95
Reviewed-by: Kwonunn <kwonunn@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
v1.24.0
2025-01-22 18:22:29 +00:00
Renovate Bot
151ce8bcab
Update dependency go to v1.22.11 (#96)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [go](https://go.dev/) ([source](https://github.com/golang/go)) | toolchain | patch | `1.22.10` -> `1.22.11` |

---

### Configuration

๐Ÿ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - "* 0-3 * * *" (UTC).

๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

โ™ป **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMTcuMiIsInVwZGF0ZWRJblZlciI6IjM5LjExNy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/96
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-01-22 17:20:28 +00:00
Michael Kriese
b3fb31153d Merge pull request 'chore(ci): do not -short all tests' (#94) from earl-warren/act:wip-skipped into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/94
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-17 08:41:19 +00:00
Earl Warren
701e3ee92b
chore(ci): do not -short all tests 2025-01-17 08:55:01 +01:00