-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.yml (1).txt
291 lines (230 loc) · 8.15 KB
/
main.yml (1).txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
Skip to content
Navigation Menu
ETEnterprises1
/
ET.ENT
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Settings
Creating a new workflow file in ET.ENT
BreadcrumbsET.ENT/.github/workflows
/
main.yml
in
main
Edit
Preview
Indent mode
Spaces
Indent size
2
Line wrap mode
No wrap
Editing main.yml file contents
1
Enter file contents here
Use Control + Shift + m to toggle the tab key moving focus. Alternatively, use esc then tab to move to the next interactive element on the page.
Use Control + Space to trigger autocomplete in most situations.
Help Panel navigation
Marketplace
Documentation
Getting started with a workflow
To help you get started, this guide shows you some basic examples. For the full GitHub Actions documentation on workflows, see "Configuring workflows."
Customizing when workflow runs are triggered
Set your workflow to run on push events to the main and release/* branches
push:Skip to content
Navigation Menu
ETEnterprises1
/
ET.ENT
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Settings
Creating a new workflow file in ET.ENT
BreadcrumbsET.ENT/.github/workflows
/
main.yml
in
main
Edit
Preview
Indent mode
Spaces
Indent size
2
Line wrap mode
No wrap
Editing main.yml file contents
1
Enter file contents here
Use Control + Shift + m to toggle the tab key moving focus. Alternatively, use esc then tab to move to the next interactive element on the page.
Use Control + Space to trigger autocomplete in most situations.
Help Panel navigation
Marketplace
Documentation
Getting started with a workflow
To help you get started, this guide shows you some basic examples. For the full GitHub Actions documentation on workflows, see "Configuring workflows."
Customizing when workflow runs are triggered
Set your workflow to run on push events to the main and release/* branches
on:
push:
branches:
- main
- release/*
Set your workflow to run on pull_request events that target the main branch
on:
pull_request:
branches:
- main
Set your workflow to run every day of the week from Monday to Friday at 2:00 UTC
on:
schedule:
- cron: "0 2 * * 1-5"
For more information, see "Events that trigger workflows."
Manually running a workflow
To manually run a workflow, you can configure your workflow to use the workflow_dispatch event. This enables a "Run workflow" button on the Actions tab.
on:
workflow_dispatch:
For more information, see "Manually running a workflow."
Running your jobs on different operating systems
GitHub Actions provides hosted runners for Linux, Windows, and macOS.
To set the operating system for your job, specify the operating system using runs-on:
jobs:
my_job:
name: deploy to staging
runs-on: ubuntu-22.04
The available virtual machine types are:
ubuntu-latest, ubuntu-22.04, or ubuntu-20.04
windows-latest, windows-2022, or windows-2019
macos-latest, macos-13, or macos-12
For more information, see "Virtual environments for GitHub Actions."
Using an action
Actions are reusable units of code that can be built and distributed by anyone on GitHub. You can find a variety of actions in GitHub Marketplace, and also in the official Actions repository.
To use an action, you must specify the repository that contains the action. We also recommend that you specify a Git tag to ensure you are using a released version of the action.
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
For more information, see "Workflow syntax for GitHub Actions."
Running a command
You can run commands on the job's virtual machine.
- name: Install Dependencies
run: npm install
For more information, see "Workflow syntax for GitHub Actions."
Running a job across a matrix of operating systems and runtime versions
You can automatically run a job across a set of different values, such as different versions of code libraries or operating systems.
For example, this job uses a matrix strategy to run across 3 versions of Node and 3 operating systems:
jobs:
test:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['18.x', '20.x']
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: npm install, build and test
run: |
npm install
npm run build --if-present
npm test
For more information, see "Workflow syntax for GitHub Actions."
Running steps or jobs conditionally
GitHub Actions supports conditions on steps and jobs using data present in your workflow context.
For example, to run a step only as part of a push and not in a pull_request, you can specify a condition in the if: property based on the event name:
steps:
- run: npm publish
if: github.event_name == 'push'
For more information, see "Contexts and expression syntax for GitHub Actions."
New File at / · ETEnterprises1/ET.ENT 'all'
branches:
- main
- release/*
Set your workflow to run on pull_request events that target the main branch
on:
pull_request:
branches:
- main
Set your workflow to run every day of the week from Monday to Friday at 2:00 UTC
on:
schedule:
- cron: "0 2 * * 1-5"
For more information, see "Events that trigger workflows."
Manually running a workflow
To manually run a workflow, you can configure your workflow to use the workflow_dispatch event. This enables a "Run workflow" button on the Actions tab.
on:
workflow_dispatch:
For more information, see "Manually running a workflow."
Running your jobs on different operating systems
GitHub Actions provides hosted runners for Linux, Windows, and macOS.
To set the operating system for your job, specify the operating system using runs-on:
jobs:
my_job:
name: deploy to staging
runs-on: ubuntu-22.04
The available virtual machine types are:
ubuntu-latest, ubuntu-22.04, or ubuntu-20.04
windows-latest, windows-2022, or windows-2019
macos-latest, macos-13, or macos-12
For more information, see "Virtual environments for GitHub Actions."
Using an action
Actions are reusable units of code that can be built and distributed by anyone on GitHub. You can find a variety of actions in GitHub Marketplace, and also in the official Actions repository.
To use an action, you must specify the repository that contains the action. We also recommend that you specify a Git tag to ensure you are using a released version of the action.
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
For more information, see "Workflow syntax for GitHub Actions."
Running a command
You can run commands on the job's virtual machine.
- name: Install Dependencies
run: npm install
For more information, see "Workflow syntax for GitHub Actions."
Running a job across a matrix of operating systems and runtime versions
You can automatically run a job across a set of different values, such as different versions of code libraries or operating systems.
For example, this job uses a matrix strategy to run across 3 versions of Node and 3 operating systems:
jobs:
test:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: ['18.x', '20.x']
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: npm install, build and test
run: |
npm install
npm run build --if-present
npm test
For more information, see "Workflow syntax for GitHub Actions."
Running steps or jobs conditionally
GitHub Actions supports conditions on steps and jobs using data present in your workflow context.
For example, to run a step only as part of a push and not in a pull_request, you can specify a condition in the if: property based on the event name:
steps:
- run: npm publish
if: github.event_name == 'push'
For more information, see "Contexts and expression syntax for GitHub Actions."
New File at / · ETEnterprises1/ET.ENT