Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a8a6e45

Browse files
authored
Fix for blank lines around code fences (#38255)
1 parent a4913b5 commit a8a6e45

272 files changed

Lines changed: 1552 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,18 @@ You can use the `git config` command to change the email address you associate w
7575

7676
{% data reusables.command_line.open_the_multi_os_terminal %}
7777
2. {% data reusables.user-settings.set_your_email_address_in_git %}
78+
7879
```shell
7980
git config --global user.email "YOUR_EMAIL"
8081
```
82+
8183
3. {% data reusables.user-settings.confirm_git_email_address_correct %}
84+
8285
```shell
8386
$ git config --global user.email
8487
<span class="output">[email protected]</span>
8588
```
89+
8690
4. {% data reusables.user-settings.link_email_with_your_account %}
8791

8892
### Setting your email address for a single repository
@@ -94,12 +98,16 @@ You can change the email address associated with commits you make in a single re
9498
{% data reusables.command_line.open_the_multi_os_terminal %}
9599
2. Change the current working directory to the local repository where you want to configure the email address that you associate with your Git commits.
96100
3. {% data reusables.user-settings.set_your_email_address_in_git %}
101+
97102
```shell
98103
git config user.email "YOUR_EMAIL"
99104
```
105+
100106
4. {% data reusables.user-settings.confirm_git_email_address_correct %}
107+
101108
```shell
102109
$ git config user.email
103110
<span class="output">[email protected]</span>
104111
```
112+
105113
5. {% data reusables.user-settings.link_email_with_your_account %}

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Alternatively, if you want to use the HTTPS protocol for both accounts, you can
5151
```shell copy
5252
git credential-osxkeychain erase https://github.com
5353
```
54+
5455
{% data reusables.git.clear-stored-gcm-credentials %}
5556
{% data reusables.git.cache-on-repository-path %}
5657
{% data reusables.accounts.create-personal-access-tokens %}
@@ -70,6 +71,7 @@ Alternatively, if you want to use the HTTPS protocol for both accounts, you can
7071
```shell copy
7172
cmdkey /delete:LegacyGeneric:target=git:https://github.com
7273
```
74+
7375
{% data reusables.git.cache-on-repository-path %}
7476
{% data reusables.accounts.create-personal-access-tokens %}
7577
{% data reusables.git.provide-credentials %}

content/actions/automating-builds-and-tests/building-and-testing-go.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ You can use the `cache-dependency-path` parameter for cases when multiple depend
141141
go-version: '1.17'
142142
cache-dependency-path: subdir/go.sum
143143
```
144+
144145
{% else %}
145146

146147
When caching is enabled, the `setup-go` action searches for the dependency file, `go.sum`, in the repository root and uses the hash of the dependency file as a part of the cache key.
@@ -162,6 +163,7 @@ Alternatively, you can use the `cache-dependency-path` parameter for cases when
162163
cache: true
163164
cache-dependency-path: subdir/go.sum
164165
```
166+
165167
{% endif %}
166168

167169
If you have a custom requirement or need finer controls for caching, you can use the [`cache` action](https://github.com/marketplace/actions/cache). For more information, see "[AUTOTITLE](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)."

content/actions/automating-builds-and-tests/building-and-testing-powershell.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
![Screenshot of a workflow run failure for a Pester test. Test reports "Expected $true, but got $false" and "Error: Process completed with exit code 1."](/assets/images/help/repository/actions-failed-pester-test-updated.png)
7474

7575
- `Invoke-Pester Unit.Tests.ps1 -Passthru` - Uses Pester to execute tests defined in a file called `Unit.Tests.ps1`. For example, to perform the same test described above, the `Unit.Tests.ps1` will contain the following:
76+
7677
```
7778
Describe "Check results file is present" {
7879
It "Check results file is present" {

content/actions/automating-builds-and-tests/building-and-testing-ruby.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ Alternatively, you can check a `.ruby-version` file into the root of your repos
8989
You can add a matrix strategy to run your workflow with more than one version of Ruby. For example, you can test your code against the latest patch releases of versions 3.1, 3.0, and 2.7.
9090

9191
{% raw %}
92+
9293
```yaml
9394
strategy:
9495
matrix:
9596
ruby-version: ['3.1', '3.0', '2.7']
9697
```
98+
9799
{% endraw %}
98100

99101
Each version of Ruby specified in the `ruby-version` array creates a job that runs the same steps. The {% raw %}`${{ matrix.ruby-version }}`{% endraw %} context is used to access the current job's version. For more information about matrix strategies and contexts, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions)" and "[AUTOTITLE](/actions/learn-github-actions/contexts)."
@@ -156,12 +158,14 @@ The `setup-ruby` actions provides a method to automatically handle the caching o
156158
To enable caching, set the following.
157159

158160
{% raw %}
161+
159162
```yaml
160163
steps:
161164
- uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
162165
with:
163166
bundler-cache: true
164167
```
168+
165169
{% endraw %}
166170

167171
This will configure bundler to install your gems to `vendor/cache`. For each successful run of your workflow, this folder will be cached by {% data variables.product.prodname_actions %} and re-downloaded for subsequent workflow runs. A hash of your gemfile.lock and the Ruby version are used as the cache key. If you install any new gems, or change a version, the cache will be invalidated and bundler will do a fresh install.

content/actions/automating-builds-and-tests/building-and-testing-swift.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
You can configure your job to use a single specific version of Swift, such as `5.3.3`.
102102

103103
{% raw %}
104+
104105
```yaml copy
105106
steps:
106107
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf
@@ -109,6 +110,7 @@ steps:
109110
- name: Get swift version
110111
run: swift --version # Swift 5.3.3
111112
```
113+
112114
{% endraw %}
113115

114116
## Building and testing your code

content/actions/creating-actions/creating-a-composite-action.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari
5151
```
5252

5353
1. From your terminal, check in your `goodbye.sh` file.
54+
5455
```shell copy
5556
git add goodbye.sh
5657
git commit -m "Add goodbye script"
@@ -63,6 +64,7 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari
6364

6465
{% raw %}
6566
**action.yml**
67+
6668
```yaml copy
6769
name: 'Hello World'
6870
description: 'Greet someone'
@@ -121,6 +123,7 @@ The following workflow code uses the completed hello world action that you made
121123
Copy the workflow code into a `.github/workflows/main.yml` file in another repository, but replace `actions/hello-world-composite-action@v1` with the repository and tag you created. You can also replace the `who-to-greet` input with your name.
122124

123125
**.github/workflows/main.yml**
126+
124127
```yaml copy
125128
on: [push]
126129

content/actions/creating-actions/creating-a-docker-container-action.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Before you begin, you'll need to create a {% data variables.product.prodname_dot
5858
In your new `hello-world-docker-action` directory, create a new `Dockerfile` file. Make sure that your filename is capitalized correctly (use a capital `D` but not a capital `f`) if you're having issues. For more information, see "[AUTOTITLE](/actions/creating-actions/dockerfile-support-for-github-actions)."
5959

6060
**Dockerfile**
61+
6162
```Dockerfile copy
6263
# Container image that runs your code
6364
FROM alpine:3.10
@@ -75,6 +76,7 @@ Create a new `action.yml` file in the `hello-world-docker-action` directory you
7576

7677
{% raw %}
7778
**action.yml**
79+
7880
```yaml copy
7981
# action.yml
8082
name: 'Hello World'
@@ -93,6 +95,7 @@ runs:
9395
args:
9496
- ${{ inputs.who-to-greet }}
9597
```
98+
9699
{% endraw %}
97100
98101
This metadata defines one `who-to-greet` input and one `time` output parameter. To pass inputs to the Docker container, you should declare the input using `inputs` and pass the input in the `args` keyword. Everything you include in `args` is passed to the container, but for better discoverability for users of your action, we recommended using inputs.
@@ -110,6 +113,7 @@ Next, the script gets the current time and sets it as an output variable that ac
110113
1. Add the following code to your `entrypoint.sh` file.
111114

112115
**entrypoint.sh**
116+
113117
```shell copy
114118
#!/bin/sh -l
115119
@@ -120,6 +124,7 @@ Next, the script gets the current time and sets it as an output variable that ac
120124
{%- else %}
121125
echo "::set-output name=time::$time"
122126
{%- endif %}
127+
123128
```
124129
If `entrypoint.sh` executes without any errors, the action's status is set to `success`. You can also explicitly set exit codes in your action's code to provide an action's status. For more information, see "[AUTOTITLE](/actions/creating-actions/setting-exit-codes-for-actions)."
125130

@@ -153,6 +158,7 @@ In your `hello-world-docker-action` directory, create a `README.md` file that sp
153158
- An example of how to use your action in a workflow.
154159

155160
**README.md**
161+
156162
```markdown copy
157163
# Hello world docker action
158164
@@ -205,6 +211,7 @@ Now you're ready to test your action out in a workflow.
205211
The following workflow code uses the completed _hello world_ action in the public [`actions/hello-world-docker-action`](https://github.com/actions/hello-world-docker-action) repository. Copy the following workflow example code into a `.github/workflows/main.yml` file, but replace the `actions/hello-world-docker-action` with your repository and action name. You can also replace the `who-to-greet` input with your name. {% ifversion fpt or ghec %}Public actions can be used even if they're not published to {% data variables.product.prodname_marketplace %}. For more information, see "[AUTOTITLE](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)." {% endif %}
206212

207213
**.github/workflows/main.yml**
214+
208215
```yaml copy
209216
on: [push]
210217
@@ -228,6 +235,7 @@ jobs:
228235
Copy the following example workflow code into a `.github/workflows/main.yml` file in your action's repository. You can also replace the `who-to-greet` input with your name. {% ifversion fpt or ghec %}This private action can't be published to {% data variables.product.prodname_marketplace %}, and can only be used in this repository.{% endif %}
229236

230237
**.github/workflows/main.yml**
238+
231239
```yaml copy
232240
on: [push]
233241

content/actions/creating-actions/creating-a-javascript-action.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ GitHub Actions provide context information about the webhook event, Git refs, wo
105105
Add a new file called `index.js`, with the following code.
106106

107107
{% raw %}
108+
108109
```javascript copy
109110
const core = require('@actions/core');
110111
const github = require('@actions/github');
@@ -122,6 +123,7 @@ try {
122123
core.setFailed(error.message);
123124
}
124125
```
126+
125127
{% endraw %}
126128

127129
If an error is thrown in the above `index.js` example, `core.setFailed(error.message);` uses the actions toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) package to log a message and set a failing exit code. For more information, see "[AUTOTITLE](/actions/creating-actions/setting-exit-codes-for-actions)."
@@ -224,6 +226,7 @@ This example demonstrates how your new public action can be run from within an e
224226
Copy the following YAML into a new file at `.github/workflows/main.yml`, and update the `uses: octocat/[email protected]` line with your username and the name of the public repository you created above. You can also replace the `who-to-greet` input with your name.
225227

226228
{% raw %}
229+
227230
```yaml copy
228231
on: [push]
229232
@@ -241,6 +244,7 @@ jobs:
241244
- name: Get the output time
242245
run: echo "The time was ${{ steps.hello.outputs.time }}"
243246
```
247+
244248
{% endraw %}
245249
246250
When this workflow is triggered, the runner will download the `hello-world-javascript-action` action from your public repository and then execute it.
@@ -250,6 +254,7 @@ When this workflow is triggered, the runner will download the `hello-world-javas
250254
Copy the workflow code into a `.github/workflows/main.yml` file in your action's repository. You can also replace the `who-to-greet` input with your name.
251255

252256
**.github/workflows/main.yml**
257+
253258
```yaml copy
254259
on: [push]
255260

content/actions/creating-actions/developing-a-third-party-cli-action.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ The following script demonstrates how you can get a user-specified version as in
3636
{% data variables.product.prodname_dotcom %} provides [`actions/toolkit`](https://github.com/actions/toolkit), which is a set of packages that helps you create actions. This example uses the [`actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) and [`actions/tool-cache`](https://github.com/actions/toolkit/tree/main/packages/tool-cache) packages.
3737

3838
{% raw %}
39+
3940
```javascript copy
4041
const core = require('@actions/core');
4142
const tc = require('@actions/tool-cache');
@@ -56,6 +57,7 @@ async function setup() {
5657

5758
module.exports = setup
5859
```
60+
5961
{% endraw %}
6062

6163
To use this script, replace `getDownloadURL` with a function that downloads your CLI. You will also need to create an actions metadata file (`action.yml`) that accepts a `version` input and that runs this script. For full details about how to create an action, see "[AUTOTITLE](/actions/creating-actions/creating-a-javascript-action)."

0 commit comments

Comments
 (0)