mirror of
https://codeberg.org/forgejo/docs.git
synced 2025-02-08 04:26:39 -05:00
docs: user: actions: document steps.uses.with
This commit is contained in:
parent
4bba8061f5
commit
a006a44222
1 changed files with 25 additions and 2 deletions
|
@ -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.
|
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:
|
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
|
instead. Or even a repository that does not contain the intended
|
||||||
action.
|
action.
|
||||||
|
|
||||||
#### Local actions
|
##### Local actions
|
||||||
|
|
||||||
An action that begins with a `./` will be loaded from a directory
|
An action that begins with a `./` will be loaded from a directory
|
||||||
instead of being cloned from a repository. The structure of the
|
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/).
|
[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
|
# Debugging workflows with forgejo-runner exec
|
||||||
|
|
||||||
To get a quicker debug loop when working on a workflow, it may be more
|
To get a quicker debug loop when working on a workflow, it may be more
|
||||||
|
|
Loading…
Add table
Reference in a new issue