Skip to content

Commit

Permalink
workflow-syntax-for-github-actions.md: services.image: document empty…
Browse files Browse the repository at this point in the history
… image (github#31751)

Co-authored-by: Siara <[email protected]>
  • Loading branch information
ronjouch and SiaraMist authored Mar 11, 2024
1 parent d4294c9 commit a1b6e22
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,15 @@ services:

## `jobs.<job_id>.services.<service_id>.image`

The Docker image to use as the service container to run the action. The value can be the Docker Hub image name or a registry name.
The Docker image to use as the service container to run the action. The value can be the Docker Hub image name or a registry name.

If `jobs.<job_id>.services.<service_id>.image` is assigned an empty string, the service will not start. You can use this to set up conditional services, similar to the following example.

```yaml
services:
nginx:
image: {% raw %}${{ options.nginx == true && 'nginx' || '' }}{% endraw %}
```

## `jobs.<job_id>.services.<service_id>.credentials`

Expand Down

0 comments on commit a1b6e22

Please sign in to comment.