Fix heading structure of workflow-syntax-for-github-actions (#33529)
Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com>
This commit is contained in:
@@ -957,7 +957,7 @@ If you configure the job to run directly on the runner machine and your step doe
|
||||
|
||||
For more information about the differences between networking service containers, see "[AUTOTITLE](/actions/using-containerized-services/about-service-containers)."
|
||||
|
||||
## Example: Using localhost
|
||||
### Example: Using localhost
|
||||
|
||||
This example creates two services: nginx and redis. When you specify the Docker host port but not the container port, the container port is randomly assigned to a free port. {% data variables.product.prodname_dotcom %} sets the assigned container port in the {% raw %}`${{job.services.<service_name>.ports}}`{% endraw %} context. In this example, you can access the service container ports using the {% raw %}`${{ job.services.nginx.ports['8080'] }}`{% endraw %} and {% raw %}`${{ job.services.redis.ports['6379'] }}`{% endraw %} contexts.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user