1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-16 18:01:34 +00:00
Commit graph

7 commits

Author SHA1 Message Date
Earl Warren
b26db065d6
fix: vars context is allowed in default values of action inputs (#786)
Resolves forgejo/runner#785

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/786): <!--number 786 --><!--line 0 --><!--description Zml4OiB2YXJzIGNvbnRleHQgaXMgYWxsb3dlZCBpbiBkZWZhdWx0IHZhbHVlcyBvZiBhY3Rpb24gaW5wdXRz-->fix: vars context is allowed in default values of action inputs<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/786
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-08-02 06:38:42 +00:00
Earl Warren
29cc7e1a71
fix: allow expressions in action descriptions and incomplete action inputs (#770)
They are commonly used for documentation purposes and never evaluated.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/770): <!--number 770 --><!--line 0 --><!--description Zml4OiBhbGxvdyBleHByZXNzaW9ucyBpbiBhY3Rpb24gZGVzY3JpcHRpb25zIGFuZCBpbmNvbXBsZXRlIGFjdGlvbiBpbnB1dHM=-->fix: allow expressions in action descriptions and incomplete action inputs<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/770
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-31 04:35:19 +00:00
Earl Warren
660e24bff5
fix: the vars context is allowed in an action step env (#761)
the actions schema validation must not fail when using an
expression such as:

```yaml
runs:
  using: composite
  steps:
    - name: Build the container image for each architecture
      env:
        BUILDKIT_HOST: ${{ vars.BUILDKIT_HOST }}
      run: buildkit-build.sh
```

---

Without the fix, the test fails with:

```
go test -run=TestActionSchema -v ./act/schema
=== RUN   TestActionSchema
    schema_test.go:153:
        	Error Trace:	/home/earl-warren/software/runner/act/schema/schema_test.go:153
        	Error:      	Received unexpected error:
        	            	Line: 14 Column 3: Failed to match container-runs: Line: 15 Column 3: Unknown Property steps
        	            	Line: 14 Column 3: Failed to match node-runs: Line: 15 Column 3: Unknown Property steps
        	            	Line: 14 Column 3: Failed to match plugin-runs: Line: 14 Column 3: Unknown Property using
        	            	Line: 15 Column 3: Unknown Property steps
        	            	Line: 14 Column 3: Failed to match composite-runs: Line: 16 Column 7: Failed to match run-step: Line: 19 Column 18: Unknown Variable Access vars
        	            	Line: 16 Column 7: Failed to match uses-step: Line: 16 Column 7: Unknown Property run
        	            	Line: 19 Column 18: Unknown Variable Access vars
        	Test:       	TestActionSchema
--- FAIL: TestActionSchema (0.00s)
FAIL
FAIL	code.forgejo.org/forgejo/runner/act/schema	0.003s
FAIL
```

---

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/761): <!--number 761 --><!--line 0 --><!--description Zml4OiB0aGUgdmFycyBjb250ZXh0IGlzIGFsbG93ZWQgaW4gYW4gYWN0aW9uIHN0ZXAgZW52-->fix: the vars context is allowed in an action step env<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/761
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-07-30 11:06:55 +00:00
Earl Warren
65dd9d4998
fix: allow expressions in step and job uses: (#766)
Resolves forgejo/runner#764

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/766): <!--number 766 --><!--line 0 --><!--description Zml4OiBhbGxvdyBleHByZXNzaW9ucyBpbiBzdGVwIGFuZCBqb2IgdXNlczo=-->fix: allow expressions in step and job uses:<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/766
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-07-30 07:35:48 +00:00
Earl Warren
34939ad5f4 fix: allow using the env context in actions defaults (#204)
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/204
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-07-27 15:24:49 +00:00
Earl Warren
765b95080b fix: runs-on is also mandatory for reusable workflows and may be needing container (#194)
If not the schema validation will fail because it will be try to validate as if not calling a reusable workflow.

```
=== RUN   TestWorkflowCallRunsOn
    schema_test.go:119:
        	Error Trace:	/home/earl-warren/software/act/pkg/schema/schema_test.go:119
        	Error:      	Received unexpected error:
        	            	Line: 10 Column 5: Failed to match job-factory: Line: 12 Column 5: Unknown Property uses
        	            	Line: 13 Column 5: Unknown Property with
        	            	Line: 15 Column 5: Unknown Property secrets
        	            	Line: 10 Column 5: Failed to match workflow-job: Line: 11 Column 5: Unknown Property runs-on
        	Test:       	TestWorkflowCallRunsOn
```

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/194
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-07-26 12:24:41 +00:00
ChristopherHX
e489be545d 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>
(cherry picked from commit f043eb7079a16dfcf54d1f44fe66795ff76e973a)
2025-07-11 14:12:22 +02:00