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
+96-2Lines changed: 96 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,45 @@ 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** | - |
- `image`(string, required) - Container image name
217
+
- `env`(object) - Environment variables
218
+
- `options`(string) - Additional Docker options
219
+
220
+
**Note:** `ports`, `volumes`, and `credentials` are not currently supported due to GitHub Actions workflow syntax limitations.
221
+
222
+
See [GitHub's container specification](https://docs.github.com/en/actions/how-tos/write-workflows/choose-where-workflows-run/run-jobs-in-a-container) for more details.
223
+
224
+
When specified, steps will execute inside this container instead of checking out code. The container should have the project code and dependencies pre-installed.
225
+
169
226
<!-- secrets:start -->
170
227
171
228
## Secrets
@@ -289,6 +346,43 @@ jobs:
289
346
test: true
290
347
```
291
348
349
+
### Continuous Integration with Advanced Container Options
350
+
351
+
This example shows how to use advanced container options like environment variables, credentials, and additional Docker options.
0 commit comments