Skip to content

Commit 095bdab

Browse files
authored
Merge branch 'main' into patch-1
2 parents 9ed2bec + a2f7e71 commit 095bdab

5,182 files changed

Lines changed: 192572 additions & 55773 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.

.github/ISSUE_TEMPLATE/improve-the-site.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Check to make sure someone hasn't already opened a similar issue: https://github
2222

2323
### What is the current behavior?
2424

25-
<!-- include links to articles where you're seeing a problem, screenshots, what browser you're using, etc. -->
25+
<!-- Include links to articles where you're seeing a problem, screenshots, what browser you're using, etc. -->
2626

2727
### What changes are you suggesting?
2828

.github/allowed-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = [
2121
'github/codeql-action/init@v1',
2222
'ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb',
2323
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
24-
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
24+
'juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9',
2525
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
2626
'lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8',
2727
'pascalgn/automerge-action@c9bd182',

.github/workflows/dry-run-sync-algolia-search-indices.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ jobs:
2121
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2222
restore-keys: |
2323
${{ runner.os }}-node-
24-
- name: npm ci
24+
- name: Install dependencies
2525
run: npm ci
26+
- name: Run build scripts
27+
run: npm run build
2628
- name: (Dry run) sync indices
2729
env:
2830
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}

.github/workflows/repo-sync.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ jobs:
5858
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
5959

6060
- name: Find pull request
61-
uses: juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b
61+
uses: juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9
6262
id: find-pull-request
6363
with:
6464
github-token: ${{ secrets.GITHUB_TOKEN }}
6565
branch: repo-sync
6666
base: main
67+
author: Octomerger
6768

6869
- name: Approve pull request
6970
if: ${{ steps.find-pull-request.outputs.number }}

.github/workflows/sync-algolia-search-indices.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ jobs:
2424
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2525
restore-keys: |
2626
${{ runner.os }}-node-
27-
- name: npm ci
27+
- name: Install dependencies
2828
run: npm ci
29+
- name: Run build scripts
30+
run: npm run build
2931
- name: sync indices
3032
env:
3133
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}

.github/workflows/translations.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ jobs:
1717
echo 'The repo is currently frozen! Exiting this workflow.'
1818
exit 1 # prevents further steps from running
1919
- name: Find original Pull Request
20-
uses: juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b
20+
uses: juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9
2121
id: pr
2222
with:
2323
github-token: ${{ secrets.GITHUB_TOKEN }}
2424
branch: translations
25+
base: main
26+
author: octoglot
2527
- if: ${{ steps.pr.outputs.number }}
2628
name: Check if already labeled
2729
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9

.github/workflows/triage-unallowed-contributions.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ jobs:
104104
body: reviewMessage,
105105
event: 'REQUEST_CHANGES'
106106
})
107-
exit 1 # prevents further steps from running and fails workflow
107+
108+
core.setFailed("It looks like you've modified some files we don't accept contributions for. Please see the review with requested changes for details.")
108109
# When the most recent review was CHANGES_REQUESTED and the existing
109110
# PR no longer contains unallowed changes, dismiss the previous review
110111
- name: Dismiss pull request review

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.algolia-cache
2+
.search-cache
23
.DS_Store
34
.env
45
/node_modules/

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

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Before you begin, you'll need to create a GitHub repository.
3939

4040
1. From your terminal, change directories into your new repository.
4141

42-
```shell
42+
```shell{:copy}
4343
cd hello-world-docker-action
4444
```
4545

@@ -48,7 +48,7 @@ Before you begin, you'll need to create a GitHub repository.
4848
In your new `hello-world-docker-action` directory, create a new `Dockerfile` file. For more information, see "[Dockerfile support for {% data variables.product.prodname_actions %}](/actions/creating-actions/dockerfile-support-for-github-actions)."
4949

5050
**Dockerfile**
51-
```dockerfile
51+
```dockerfile{:copy}
5252
# Container image that runs your code
5353
FROM alpine:3.10
5454
@@ -65,7 +65,7 @@ Create a new `action.yml` file in the `hello-world-docker-action` directory you
6565

6666
{% raw %}
6767
**action.yml**
68-
```yaml
68+
```yaml{:copy}
6969
# action.yml
7070
name: 'Hello World'
7171
description: 'Greet someone and record the time'
@@ -93,29 +93,28 @@ This metadata defines one `who-to-greet` input and one `time` output parameter.
9393

9494
You can choose any base Docker image and, therefore, any language for your action. The following shell script example uses the `who-to-greet` input variable to print "Hello [who-to-greet]" in the log file.
9595

96-
Next, the script gets the current time and sets it as an output variable that actions running later in a job can use. In order for {% data variables.product.prodname_dotcom %} to recognize output variables, you must use a workflow command in a specific syntax: `echo "::set-output name=<output name>::<value>"`. For more information, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter)."
96+
Next, the script gets the current time and sets it as an output variable that actions running later in a job can use. In order for {% data variables.product.prodname_dotcom %} to recognize output variables, you must use a workflow command in a specific syntax: `echo "::set-output name=<output name>::<value>"`. For more information, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter)."
9797

9898
1. Create a new `entrypoint.sh` file in the `hello-world-docker-action` directory.
9999

100-
1. Make your `entrypoint.sh` file executable:
101-
102-
```shell
103-
chmod +x entrypoint.sh
104-
```
105-
106100
1. Add the following code to your `entrypoint.sh` file.
107101

108102
**entrypoint.sh**
109-
```shell
103+
```shell{:copy}
110104
#!/bin/sh -l
111105
112106
echo "Hello $1"
113107
time=$(date)
114108
echo "::set-output name=time::$time"
115109
```
116-
117110
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 "[Setting exit codes for actions](/actions/creating-actions/setting-exit-codes-for-actions)."
118111

112+
1. Make your `entrypoint.sh` file executable by running the following command on your system.
113+
114+
```shell{:copy}
115+
$ chmod +x entrypoint.sh
116+
```
117+
119118
### Creating a README
120119

121120
To let people know how to use your action, you can create a README file. A README is most helpful when you plan to share your action publicly, but is also a great way to remind you or your team how to use the action.
@@ -130,7 +129,7 @@ In your `hello-world-docker-action` directory, create a `README.md` file that sp
130129
- An example of how to use your action in a workflow.
131130

132131
**README.md**
133-
```markdown
132+
```markdown{:copy}
134133
# Hello world docker action
135134
136135
This action prints "Hello World" or "Hello" + the name of a person to greet to the log.
@@ -160,7 +159,7 @@ From your terminal, commit your `action.yml`, `entrypoint.sh`, `Dockerfile`, and
160159

161160
It's best practice to also add a version tag for releases of your action. For more information on versioning your action, see "[About actions](/actions/automating-your-workflow-with-github-actions/about-actions#using-release-management-for-actions)."
162161

163-
```shell
162+
```shell{:copy}
164163
git add action.yml entrypoint.sh Dockerfile README.md
165164
git commit -m "My first action is ready"
166165
git tag -a -m "My first action release" v1
@@ -175,11 +174,11 @@ Now you're ready to test your action out in a workflow. When an action is in a p
175174

176175
#### Example using a public action
177176

178-
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.
177+
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. {% if currentVersion == "free-pro-team@latest" %}Public actions can be used even if they're not published to {% data variables.product.prodname_marketplace %}. For more information, see "[Publishing an action](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)." {% endif %}
179178

180179
{% raw %}
181180
**.github/workflows/main.yml**
182-
```yaml
181+
```yaml{:copy}
183182
on: [push]
184183
185184
jobs:
@@ -200,11 +199,11 @@ jobs:
200199

201200
#### Example using a private action
202201

203-
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.
202+
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. {% if currentVersion == "free-pro-team@latest" %}This private action can't be published to {% data variables.product.prodname_marketplace %}, and can only be used in this repository.{% endif %}
204203

205204
{% raw %}
206205
**.github/workflows/main.yml**
207-
```yaml
206+
```yaml{:copy}
208207
on: [push]
209208
210209
jobs:

content/actions/guides/about-service-containers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You can use the `services` keyword to create service containers that are part of
4747
This example creates a service called `redis` in a job called `container-job`. The Docker host in this example is the `node:10.18-jessie` container.
4848

4949
{% raw %}
50-
```yaml
50+
```yaml{:copy}
5151
name: Redis container example
5252
on: push
5353
@@ -89,7 +89,7 @@ When you specify the Docker host port but not the container port, the container
8989
This example maps the service container `redis` port 6379 to the Docker host port 6379.
9090

9191
{% raw %}
92-
```yaml
92+
```yaml{:copy}
9393
name: Redis Service Example
9494
on: push
9595

0 commit comments

Comments
 (0)