Skip to content

Commit 829ea6d

Browse files
authored
repo sync
2 parents 838569a + 9a07d5a commit 829ea6d

6 files changed

Lines changed: 277 additions & 276 deletions

content/actions/learn-github-actions/migrating-from-azure-pipelines-to-github-actions.md

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ Azure Pipelines
6262
{% raw %}
6363
```yaml
6464
jobs:
65-
- job: scripts
66-
pool:
67-
vmImage: 'windows-latest'
68-
steps:
69-
- script: echo "This step runs in the default shell"
70-
- bash: echo "This step runs in bash"
71-
- pwsh: Write-Host "This step runs in PowerShell Core"
72-
- task: PowerShell@2
73-
inputs:
74-
script: Write-Host "This step runs in PowerShell"
65+
- job: scripts
66+
pool:
67+
vmImage: 'windows-latest'
68+
steps:
69+
- script: echo "This step runs in the default shell"
70+
- bash: echo "This step runs in bash"
71+
- pwsh: Write-Host "This step runs in PowerShell Core"
72+
- task: PowerShell@2
73+
inputs:
74+
script: Write-Host "This step runs in PowerShell"
7575
```
7676
{% endraw %}
7777
</td>
@@ -82,13 +82,13 @@ jobs:
8282
scripts:
8383
runs-on: windows-latest
8484
steps:
85-
- run: echo "This step runs in the default shell"
86-
- run: echo "This step runs in bash"
87-
shell: bash
88-
- run: Write-Host "This step runs in PowerShell Core"
89-
shell: pwsh
90-
- run: Write-Host "This step runs in PowerShell"
91-
shell: powershell
85+
- run: echo "This step runs in the default shell"
86+
- run: echo "This step runs in bash"
87+
shell: bash
88+
- run: Write-Host "This step runs in PowerShell Core"
89+
shell: pwsh
90+
- run: Write-Host "This step runs in PowerShell"
91+
shell: powershell
9292
```
9393
{% endraw %}
9494
</td>
@@ -123,11 +123,11 @@ Azure Pipelines
123123
{% raw %}
124124
```yaml
125125
jobs:
126-
- job: run_command
127-
pool:
128-
vmImage: 'windows-latest'
129-
steps:
130-
- script: echo "This step runs in CMD on Windows by default"
126+
- job: run_command
127+
pool:
128+
vmImage: 'windows-latest'
129+
steps:
130+
- script: echo "This step runs in CMD on Windows by default"
131131
```
132132
{% endraw %}
133133
</td>
@@ -138,9 +138,9 @@ jobs:
138138
run_command:
139139
runs-on: windows-latest
140140
steps:
141-
- run: echo "This step runs in PowerShell on Windows by default"
142-
- run: echo "This step runs in CMD on Windows explicitly"
143-
shell: cmd
141+
- run: echo "This step runs in PowerShell on Windows by default"
142+
- run: echo "This step runs in CMD on Windows explicitly"
143+
shell: cmd
144144
```
145145
{% endraw %}
146146
</td>
@@ -171,12 +171,12 @@ Azure Pipelines
171171
{% raw %}
172172
```yaml
173173
jobs:
174-
- job: conditional
175-
pool:
176-
vmImage: 'ubuntu-latest'
177-
steps:
178-
- script: echo "This step runs with str equals 'ABC' and num equals 123"
179-
condition: and(eq(variables.str, 'ABC'), eq(variables.num, 123))
174+
- job: conditional
175+
pool:
176+
vmImage: 'ubuntu-latest'
177+
steps:
178+
- script: echo "This step runs with str equals 'ABC' and num equals 123"
179+
condition: and(eq(variables.str, 'ABC'), eq(variables.num, 123))
180180
```
181181
{% endraw %}
182182
</td>
@@ -187,8 +187,8 @@ jobs:
187187
conditional:
188188
runs-on: ubuntu-latest
189189
steps:
190-
- run: echo "This step runs with str equals 'ABC' and num equals 123"
191-
if: ${{ env.str == 'ABC' && env.num == 123 }}
190+
- run: echo "This step runs with str equals 'ABC' and num equals 123"
191+
if: ${{ env.str == 'ABC' && env.num == 123 }}
192192
```
193193
{% endraw %}
194194
</td>
@@ -217,29 +217,29 @@ Azure Pipelines
217217
{% raw %}
218218
```yaml
219219
jobs:
220-
- job: initial
221-
pool:
222-
vmImage: 'ubuntu-latest'
223-
steps:
224-
- script: echo "This job will be run first."
225-
- job: fanout1
226-
pool:
227-
vmImage: 'ubuntu-latest'
228-
dependsOn: initial
229-
steps:
230-
- script: echo "This job will run after the initial job, in parallel with fanout2."
231-
- job: fanout2
232-
pool:
233-
vmImage: 'ubuntu-latest'
234-
dependsOn: initial
235-
steps:
236-
- script: echo "This job will run after the initial job, in parallel with fanout1."
237-
- job: fanin:
238-
pool:
239-
vmImage: 'ubuntu-latest'
240-
dependsOn: [fanout1, fanout2]
241-
steps:
242-
- script: echo "This job will run after fanout1 and fanout2 have finished."
220+
- job: initial
221+
pool:
222+
vmImage: 'ubuntu-latest'
223+
steps:
224+
- script: echo "This job will be run first."
225+
- job: fanout1
226+
pool:
227+
vmImage: 'ubuntu-latest'
228+
dependsOn: initial
229+
steps:
230+
- script: echo "This job will run after the initial job, in parallel with fanout2."
231+
- job: fanout2
232+
pool:
233+
vmImage: 'ubuntu-latest'
234+
dependsOn: initial
235+
steps:
236+
- script: echo "This job will run after the initial job, in parallel with fanout1."
237+
- job: fanin:
238+
pool:
239+
vmImage: 'ubuntu-latest'
240+
dependsOn: [fanout1, fanout2]
241+
steps:
242+
- script: echo "This job will run after fanout1 and fanout2 have finished."
243243
```
244244
{% endraw %}
245245
</td>
@@ -250,22 +250,22 @@ jobs:
250250
initial:
251251
runs-on: ubuntu-latest
252252
steps:
253-
- run: echo "This job will be run first."
253+
- run: echo "This job will be run first."
254254
fanout1:
255255
runs-on: ubuntu-latest
256256
needs: initial
257257
steps:
258-
- run: echo "This job will run after the initial job, in parallel with fanout2."
258+
- run: echo "This job will run after the initial job, in parallel with fanout2."
259259
fanout2:
260260
runs-on: ubuntu-latest
261261
needs: initial
262262
steps:
263-
- run: echo "This job will run after the initial job, in parallel with fanout1."
263+
- run: echo "This job will run after the initial job, in parallel with fanout1."
264264
fanin:
265265
runs-on: ubuntu-latest
266266
needs: [fanout1, fanout2]
267267
steps:
268-
- run: echo "This job will run after fanout1 and fanout2 have finished."
268+
- run: echo "This job will run after fanout1 and fanout2 have finished."
269269
```
270270
{% endraw %}
271271
</td>
@@ -294,15 +294,15 @@ Azure Pipelines
294294
{% raw %}
295295
```yaml
296296
jobs:
297-
- job: run_python
298-
pool:
299-
vmImage: 'ubuntu-latest'
300-
steps:
301-
- task: UsePythonVersion@0
302-
inputs:
303-
versionSpec: '3.7'
304-
architecture: 'x64'
305-
- script: python script.py
297+
- job: run_python
298+
pool:
299+
vmImage: 'ubuntu-latest'
300+
steps:
301+
- task: UsePythonVersion@0
302+
inputs:
303+
versionSpec: '3.7'
304+
architecture: 'x64'
305+
- script: python script.py
306306
```
307307
{% endraw %}
308308
</td>
@@ -313,11 +313,11 @@ jobs:
313313
run_python:
314314
runs-on: ubuntu-latest
315315
steps:
316-
- uses: actions/setup-python@v2
317-
with:
318-
python-version: '3.7'
319-
architecture: 'x64'
320-
- run: python script.py
316+
- uses: actions/setup-python@v2
317+
with:
318+
python-version: '3.7'
319+
architecture: 'x64'
320+
- run: python script.py
321321
```
322322
{% endraw %}
323323
</td>

content/actions/learn-github-actions/migrating-from-circleci-to-github-actions.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -258,24 +258,24 @@ jobs:
258258
POSTGRES_DB: ruby25
259259
POSTGRES_PASSWORD: ""
260260
ports:
261-
- 5432:5432
261+
- 5432:5432
262262
# Add a health check
263263
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
264264
265265
steps:
266-
# This Docker file changes sets USER to circleci instead of using the default user, so we need to update file permissions for this image to work on GH Actions.
267-
# See https://docs.github.com/actions/reference/virtual-environments-for-github-hosted-runners#docker-container-filesystem
268-
- name: Setup file system permissions
269-
run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp
270-
- uses: actions/checkout@v2
271-
- name: Install dependencies
272-
run: bundle install --path vendor/bundle
273-
- name: Setup environment configuration
274-
run: cp .sample.env .env
275-
- name: Setup database
276-
run: bundle exec rake db:setup
277-
- name: Run tests
278-
run: bundle exec rake
266+
# This Docker file changes sets USER to circleci instead of using the default user, so we need to update file permissions for this image to work on GH Actions.
267+
# See https://docs.github.com/actions/reference/virtual-environments-for-github-hosted-runners#docker-container-filesystem
268+
- name: Setup file system permissions
269+
run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp
270+
- uses: actions/checkout@v2
271+
- name: Install dependencies
272+
run: bundle install --path vendor/bundle
273+
- name: Setup environment configuration
274+
run: cp .sample.env .env
275+
- name: Setup database
276+
run: bundle exec rake db:setup
277+
- name: Run tests
278+
run: bundle exec rake
279279
```
280280
{% endraw %}
281281
</td>
@@ -412,35 +412,35 @@ jobs:
412412
POSTGRES_DB: ruby25
413413
POSTGRES_PASSWORD: ""
414414
ports:
415-
- 5432:5432
415+
- 5432:5432
416416
# Add a health check
417417
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
418418
419419
steps:
420-
- uses: actions/checkout@v2
421-
- name: Setup Ruby
422-
uses: eregon/use-ruby-action@master
423-
with:
424-
ruby-version: ${{ matrix.ruby }}
425-
- name: Cache dependencies
426-
uses: actions/cache@v2
427-
with:
428-
path: vendor/bundle
429-
key: administrate-${{ matrix.image }}-${{ hashFiles('Gemfile.lock') }}
430-
- name: Install postgres headers
431-
run: sudo apt-get install libpq-dev
432-
- name: Install dependencies
433-
run: bundle install --path vendor/bundle
434-
- name: Setup environment configuration
435-
run: cp .sample.env .env
436-
- name: Setup database
437-
run: bundle exec rake db:setup
438-
- name: Run tests
439-
run: bundle exec rake
440-
- name: Install appraisal
441-
run: bundle exec appraisal install
442-
- name: Run appraisal
443-
run: bundle exec appraisal rake
420+
- uses: actions/checkout@v2
421+
- name: Setup Ruby
422+
uses: eregon/use-ruby-action@master
423+
with:
424+
ruby-version: ${{ matrix.ruby }}
425+
- name: Cache dependencies
426+
uses: actions/cache@v2
427+
with:
428+
path: vendor/bundle
429+
key: administrate-${{ matrix.image }}-${{ hashFiles('Gemfile.lock') }}
430+
- name: Install postgres headers
431+
run: sudo apt-get install libpq-dev
432+
- name: Install dependencies
433+
run: bundle install --path vendor/bundle
434+
- name: Setup environment configuration
435+
run: cp .sample.env .env
436+
- name: Setup database
437+
run: bundle exec rake db:setup
438+
- name: Run tests
439+
run: bundle exec rake
440+
- name: Install appraisal
441+
run: bundle exec appraisal install
442+
- name: Run appraisal
443+
run: bundle exec appraisal rake
444444
```
445445
{% endraw %}
446446
</td>

0 commit comments

Comments
 (0)