0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-11-21 17:36:59 -05:00

docs: user: actions: document steps.uses.with

This commit is contained in:
Earl Warren 2023-07-13 18:54:00 +02:00 committed by Caesar Schinas
parent 4bba8061f5
commit a006a44222
No known key found for this signature in database
GPG key ID: AE9108461BEA5ACF

View file

@ -297,7 +297,7 @@ The `runs-on: self-hosted` label will run the jobs in a [LXC](https://linuxconta
Specifies the repository from which the `Action` will be cloned or a directory where it can be found.
#### Remote actions
##### Remote actions
A relative `Action` such as `uses: actions/checkout@v3` will clone the repository at the URL composed by prepending the default actions URL which is https://code.forgejo.org/. It is the equivalent of providing the fully qualified URL `uses: https://code.forgejo.org/actions/checkout@v3`. In other words the following:
@ -328,7 +328,7 @@ it gets an outdated version from https://tooold.org/actions/checkout
instead. Or even a repository that does not contain the intended
action.
#### Local actions
##### Local actions
An action that begins with a `./` will be loaded from a directory
instead of being cloned from a repository. The structure of the
@ -339,6 +339,29 @@ repository.
[Checkout the example](https://code.forgejo.org/actions/setup-forgejo/src/branch/main/testdata/example-local-action/).
##### with
A dictionary mapping the inputs of the action to concrete values. The `action.yml` defines and documents the inputs.
```yaml
on: [push]
jobs:
ls:
runs-on: docker
steps:
- uses: actions/checkout@v3
- id: local-action
uses: ./.forgejo/local-action
with:
input-two-required: 'two'
```
[Checkout the example](https://code.forgejo.org/actions/setup-forgejo/src/branch/main/testdata/example-local-action/.forgejo/workflows/test.yml)
For remote actions that are implemented with a `Dockerfile` instead of `action.yml`, the `args` key is used as command line arguments when the container is run.
[Checkout the example](https://code.forgejo.org/actions/setup-forgejo/src/branch/main/testdata/example-docker-action/.forgejo/workflows/test.yml)
# Debugging workflows with forgejo-runner exec
To get a quicker debug loop when working on a workflow, it may be more