You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/continuous-integration.md
+92-2Lines changed: 92 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,29 @@ jobs:
126
126
# Default: `.`
127
127
working-directory: .
128
128
129
-
# Docker container image to run CI steps in. When specified, steps will execute inside this container instead of checking out code. The container should have the project code and dependencies pre-installed.
129
+
# Container configuration to run CI steps in.
130
+
# Accepts either a string (container image name) or a JSON object with container options.
131
+
#
132
+
# String format (simple):
133
+
# container: "node:18"
134
+
#
135
+
# JSON object format (advanced):
136
+
# container: |
137
+
# {
138
+
# "image": "node:18",
139
+
# "env": {
140
+
# "NODE_ENV": "production"
141
+
# },
142
+
# "ports": [8080],
143
+
# "volumes": ["/tmp:/tmp"],
144
+
# "options": "--cpus 2"
145
+
# }
146
+
#
147
+
# All properties from GitHub's container specification are supported except credentials (use secrets instead).
148
+
# See https://docs.github.com/en/actions/how-tos/write-workflows/choose-where-workflows-run/run-jobs-in-a-container
149
+
#
150
+
# When specified, steps will execute inside this container instead of checking out code.
151
+
# The container should have the project code and dependencies pre-installed.
130
152
container: ""
131
153
````
132
154
@@ -162,10 +184,39 @@ jobs:
162
184
| | Set to `null` or empty to disable. | | | |
163
185
| | Accepts a JSON object for test options. See [test action](../actions/test/README.md). | | | |
164
186
| **`working-directory`** | Working directory where the dependencies are installed. | **false** | **string** | `.` |
165
-
| **`container`** | Docker container image to run CI steps in. When specified, steps will execute inside this container instead of checking out code. The container should have the project code and dependencies pre-installed. | **false** | **string** | - |
187
+
| **`container`** | Container configuration to run CI steps in. Accepts string or JSON object. See Container Configuration below | **false** | **string** | - |
All properties from [GitHub's container specification](https://docs.github.com/en/actions/how-tos/write-workflows/choose-where-workflows-run/run-jobs-in-a-container) are supported except `credentials` (use secrets instead).
217
+
218
+
When specified, steps will execute inside this container instead of checking out code. The container should have the project code and dependencies pre-installed.
219
+
169
220
<!-- secrets:start -->
170
221
171
222
## Secrets
@@ -289,6 +340,45 @@ jobs:
289
340
test: true
290
341
```
291
342
343
+
### Continuous Integration with Advanced Container Options
344
+
345
+
This example shows how to use advanced container options like environment variables, ports, volumes, and additional Docker options.
0 commit comments