Skip to content

Commit 9ee5a27

Browse files
authored
Merge pull request #27738 from github/repo-sync
Repo sync
2 parents 6adb151 + 944eb9d commit 9ee5a27

12 files changed

+80
-80
lines changed

content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ topics:
1515
- Java
1616
- Ant
1717
shortTitle: Build & test Java & Ant
18+
layout: inline
1819
---
19-
20+
2021
{% data reusables.actions.enterprise-github-hosted-runners %}
2122

2223
## Introduction
@@ -41,42 +42,38 @@ We recommend that you have a basic understanding of Java and the Ant framework.
4142

4243
## Using the Ant starter workflow
4344

44-
{% data variables.product.prodname_dotcom %} provides an Ant starter workflow that will work for most Ant-based Java projects. For more information, see the [Ant starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/ant.yml).
45+
{% data variables.product.prodname_dotcom %} provides an Ant starter workflow that will work for most Ant-based Java projects. For more information, see the [Ant starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/ant.yml). {% data reusables.actions.workflows.starter-workflows %}
4546

4647
To get started quickly, you can choose the preconfigured Ant starter workflow when you create a new workflow. For more information, see the "[AUTOTITLE](/actions/quickstart)."
4748

4849
You can also add this workflow manually by creating a new file in the `.github/workflows` directory of your repository.
4950

50-
```yaml copy
51+
```yaml annotate copy
52+
# {% data reusables.actions.workflows.workflow-syntax-name %}
5153
name: Java CI
5254

55+
#
5356
on: [push]
54-
57+
#
5558
jobs:
5659
build:
60+
{% data reusables.actions.example-github-runner-comment %}
5761
runs-on: ubuntu-latest
58-
62+
#
5963
steps:
64+
{% data reusables.actions.workflows.workflow-checkout-step-explainer %}
6065
- uses: {% data reusables.actions.action-checkout %}
66+
{% data reusables.actions.workflows.setup-java-step-explainer %}
6167
- name: Set up JDK 17
6268
uses: {% data reusables.actions.action-setup-java %}
6369
with:
6470
java-version: '17'
6571
distribution: 'temurin'
72+
# This step runs the default target in your `build.xml` file in non-interactive mode.
6673
- name: Build with Ant
6774
run: ant -noinput -buildfile build.xml
6875
```
6976
70-
This workflow performs the following steps:
71-
72-
1. The `checkout` step downloads a copy of your repository on the runner.
73-
1. The `setup-java` step configures the Eclipse Temurin (Java) 17 JDK by Eclipse Adoptium.
74-
1. The "Build with Ant" step runs the default target in your `build.xml` in non-interactive mode.
75-
76-
The default starter workflows are excellent starting points when creating your build and test workflow, and you can customize the starter workflow to suit your project’s needs.
77-
78-
{% data reusables.actions.example-github-runner %}
79-
8077
{% data reusables.actions.java-jvm-architecture %}
8178
8279
## Building and testing your code
@@ -111,7 +108,7 @@ steps:
111108
with:
112109
java-version: '17'
113110
distribution: 'temurin'
114-
111+
115112
- run: ant -noinput -buildfile build.xml
116113
- uses: {% data reusables.actions.action-upload-artifact %}
117114
with:

content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ topics:
1515
- Java
1616
- Gradle
1717
shortTitle: Build & test Java & Gradle
18+
layout: inline
1819
---
19-
20+
2021
{% data reusables.actions.enterprise-github-hosted-runners %}
2122

2223
## Introduction
@@ -41,51 +42,53 @@ We recommend that you have a basic understanding of Java and the Gradle framewor
4142

4243
## Using the Gradle starter workflow
4344

44-
{% data variables.product.prodname_dotcom %} provides a Gradle starter workflow that will work for most Gradle-based Java projects. For more information, see the [Gradle starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml).
45+
{% data variables.product.prodname_dotcom %} provides a Gradle starter workflow that will work for most Gradle-based Java projects. For more information, see the [Gradle starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml). {% data reusables.actions.workflows.starter-workflows %}
4546

4647
To get started quickly, you can choose the preconfigured Gradle starter workflow when you create a new workflow. For more information, see the "[AUTOTITLE](/actions/quickstart)."
4748

4849
You can also add this workflow manually by creating a new file in the `.github/workflows` directory of your repository.
4950

50-
```yaml copy
51-
{% data reusables.actions.actions-not-certified-by-github-comment %}
51+
{% note %}
52+
53+
**Notes:**
5254

53-
{% data reusables.actions.actions-use-sha-pinning-comment %}
55+
- {% data reusables.actions.actions-not-certified-by-github %}
56+
- {% data reusables.actions.actions-use-sha-pinning %}
5457

58+
{% endnote %}
59+
60+
```yaml annotate copy
61+
# {% data reusables.actions.workflows.workflow-syntax-name %}
5562
name: Java CI
5663

64+
#
5765
on: [push]
58-
66+
#
5967
jobs:
6068
build:
61-
runs-on: ubuntu-latest
6269

70+
{% data reusables.actions.example-github-runner-comment %}
71+
runs-on: ubuntu-latest
72+
#
6373
steps:
74+
{% data reusables.actions.workflows.workflow-checkout-step-explainer %}
6475
- uses: {% data reusables.actions.action-checkout %}
76+
{% data reusables.actions.workflows.setup-java-step-explainer %}
6577
- name: Set up JDK 17
6678
uses: {% data reusables.actions.action-setup-java %}
6779
with:
6880
java-version: '17'
6981
distribution: 'temurin'
82+
# The "Validate Gradle wrapper" step validates the checksums of Gradle Wrapper JAR files present in the source tree.
7083
- name: Validate Gradle wrapper
7184
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
85+
# The "Build with Gradle" step does a build using the `gradle/gradle-build-action` action provided by the Gradle organization on {% data variables.product.prodname_dotcom %}. The action takes care of invoking Gradle, collecting results, and caching state between jobs. For more information see [`gradle/gradle-build-action`](https://github.com/gradle/gradle-build-action).
7286
- name: Build with Gradle
7387
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
7488
with:
7589
arguments: build
7690
```
7791
78-
This workflow performs the following steps:
79-
80-
1. The `checkout` step downloads a copy of your repository on the runner.
81-
1. The `setup-java` step configures the Eclipse Temurin (Java) 17 JDK by Eclipse Adoptium.
82-
1. The "Validate Gradle wrapper" step validates the checksums of Gradle Wrapper JAR files present in the source tree.
83-
1. The "Build with Gradle" step does a build using the `gradle/gradle-build-action` action provided by the Gradle organization on {% data variables.product.prodname_dotcom %}. The action takes care of invoking Gradle, collecting results, and caching state between jobs. For more information see [`gradle/gradle-build-action`](https://github.com/gradle/gradle-build-action).
84-
85-
The default starter workflows are excellent starting points when creating your build and test workflow, and you can customize the starter workflow to suit your project’s needs.
86-
87-
{% data reusables.actions.example-github-runner %}
88-
8992
{% data reusables.actions.java-jvm-architecture %}
9093
9194
## Building and testing your code

content/actions/automating-builds-and-tests/building-and-testing-java-with-maven.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ topics:
1515
- Java
1616
- Maven
1717
shortTitle: Build & test Java with Maven
18+
layout: inline
1819
---
19-
20+
2021
{% data reusables.actions.enterprise-github-hosted-runners %}
2122

2223
## Introduction
@@ -47,35 +48,34 @@ To get started quickly, you can choose the preconfigured Maven starter workflow
4748

4849
You can also add this workflow manually by creating a new file in the `.github/workflows` directory of your repository.
4950

50-
```yaml copy
51+
```yaml annotate copy
52+
# {% data reusables.actions.workflows.workflow-syntax-name %}
5153
name: Java CI
5254

55+
#
5356
on: [push]
54-
57+
#
5558
jobs:
5659
build:
57-
runs-on: ubuntu-latest
5860

61+
{% data reusables.actions.example-github-runner-comment %}
62+
runs-on: ubuntu-latest
63+
#
5964
steps:
65+
{% data reusables.actions.workflows.workflow-checkout-step-explainer %}
6066
- uses: {% data reusables.actions.action-checkout %}
67+
{% data reusables.actions.workflows.setup-java-step-explainer %}
6168
- name: Set up JDK 17
6269
uses: {% data reusables.actions.action-setup-java %}
6370
with:
6471
java-version: '17'
6572
distribution: 'temurin'
73+
# The "Build with Maven" step runs the Maven `package` target in non-interactive mode to ensure that your code builds, tests pass, and a package can be created.
6674
- name: Build with Maven
6775
run: mvn --batch-mode --update-snapshots package
6876
```
6977
70-
This workflow performs the following steps:
71-
72-
1. The `checkout` step downloads a copy of your repository on the runner.
73-
1. The `setup-java` step configures the Eclipse Temurin (Java) 17 JDK by Eclipse Adoptium.
74-
1. The "Build with Maven" step runs the Maven `package` target in non-interactive mode to ensure that your code builds, tests pass, and a package can be created.
75-
76-
The default starter workflows are excellent starting points when creating your build and test workflow, and you can customize the starter workflow to suit your project’s needs.
77-
78-
{% data reusables.actions.example-github-runner %}
78+
{% data reusables.actions.workflows.starter-workflows %}
7979
8080
{% data reusables.actions.java-jvm-architecture %}
8181

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

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ topics:
1616
- Node
1717
- JavaScript
1818
shortTitle: Build & test Node.js
19+
layout: inline
1920
---
20-
21+
2122
{% data reusables.actions.enterprise-github-hosted-runners %}
2223

2324
## Introduction
@@ -37,39 +38,49 @@ We recommend that you have a basic understanding of Node.js, YAML, workflow conf
3738

3839
{% data variables.product.prodname_dotcom %} provides a Node.js starter workflow that will work for most Node.js projects. This guide includes npm and Yarn examples that you can use to customize the starter workflow. For more information, see the [Node.js starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml).
3940

40-
To get started quickly, add the starter workflow to the `.github/workflows` directory of your repository. The workflow shown below assumes that the default branch for your repository is `main`.
41+
{% data reusables.actions.workflows.starter-workflows %}
4142

42-
```yaml copy
43+
To get started quickly, add the starter workflow to the `.github/workflows` directory of your repository.
44+
45+
```yaml annotate copy
46+
# {% data reusables.actions.workflows.workflow-syntax-name %}
4347
name: Node.js CI
4448

49+
# This example workflow assumes that the default branch for your repository is `main`. If the default branch has a different name, edit this example and add your repository's default branch.
4550
on:
4651
push:
4752
branches: [ main ]
4853
pull_request:
4954
branches: [ main ]
5055

56+
#
5157
jobs:
5258
build:
5359

60+
{% data reusables.actions.example-github-runner-comment %}
5461
runs-on: ubuntu-latest
5562

63+
# This job uses a matrix strategy to run the job four times, once for each specified Node version. For more information, see "[AUTOTITLE](/actions/using-jobs/using-a-matrix-for-your-jobs)."
5664
strategy:
5765
matrix:
5866
node-version: [14.x, 16.x, 18.x, 20.x]
59-
67+
#
6068
steps:
69+
{% data reusables.actions.workflows.workflow-checkout-step-explainer %}
6170
- uses: {% data reusables.actions.action-checkout %}
71+
# This step uses the `actions/setup-node` action to set up Node.js for each version indicated by the `matrix.node-version` key above.
6272
- name: Use Node.js {% raw %}${{ matrix.node-version }}{% endraw %}
6373
uses: {% data reusables.actions.action-setup-node %}
6474
with:
6575
node-version: {% raw %}${{ matrix.node-version }}{% endraw %}
76+
# This step runs `npm ci` to install any dependencies listed in your `package.json` file.
6677
- run: npm ci
78+
# This step runs the `build` script if there is one specified under the `scripts` key in your `package.json` file.
6779
- run: npm run build --if-present
80+
# This step runs the `test` script that is specified under the `scripts` key in your `package.json` file.
6881
- run: npm test
6982
```
7083
71-
{% data reusables.actions.example-github-runner %}
72-
7384
## Specifying the Node.js version
7485
7586
The easiest way to specify a Node.js version is by using the `setup-node` action provided by {% data variables.product.prodname_dotcom %}. For more information see, [`setup-node`](https://github.com/actions/setup-node/).
@@ -178,7 +189,7 @@ steps:
178189
run: yarn --frozen-lockfile
179190
```
180191

181-
Alternatively, you can install the dependencies defined in the _package.json_ file.
192+
Alternatively, you can install the dependencies defined in the _package.json_ file.
182193

183194
```yaml copy
184195
steps:

content/actions/using-workflows/workflow-syntax-for-github-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You must store workflow files in the `.github/workflows` directory of your repos
2525

2626
## `name`
2727

28-
The name of your workflow. {% data variables.product.prodname_dotcom %} displays the names of your workflows on your repository's "Actions" tab. If you omit `name`, {% data variables.product.prodname_dotcom %} sets it to the workflow file path relative to the root of the repository.
28+
{% data reusables.actions.workflows.workflow-syntax-name %}
2929

3030
{% ifversion actions-run-name %}
3131

@@ -236,7 +236,7 @@ The value of this parameter is a string specifying the data type of the input. T
236236

237237
### Setting the `GITHUB_TOKEN` permissions for all jobs in a workflow
238238

239-
You can specify `permissions` at the top level of a workflow, so that the setting applies to all jobs in the workflow.
239+
You can specify `permissions` at the top level of a workflow, so that the setting applies to all jobs in the workflow.
240240

241241
#### Example: Setting the `GITHUB_TOKEN` permissions for an entire workflow
242242

content/code-security/codeql-cli/codeql-cli-manual/pack-add.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: pack add
3-
versions:
3+
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
44
fpt: '*'
55
ghae: '*'
66
ghec: '*'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# <!-- This is a YAML comment for use in annotated code examples. -->
2+
# You can run this workflow using a different operating systems.
3+
#
4+
# The starter workflow configures jobs to run on Linux, using the {% data variables.product.prodname_dotcom %}-hosted `ubuntu-latest` runners. You can change the `runs-on` key to run your jobs on a different operating system.
5+
#
6+
# For example, you can use the {% data variables.product.prodname_dotcom %}-hosted Windows runners by specifying `runs-on: windows-latest`. Or, you can run on the {% data variables.product.prodname_dotcom %}-hosted macOS runners using `runs-on: macos-latest`.
7+
#
8+
# You can also run jobs in Docker containers, or you can provide a self-hosted runner that runs on your own infrastructure. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on)."

data/reusables/actions/example-github-runner.md

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This step uses the `actions/setup-java` action to configure the Eclipse Temurin (Java) 17 JDK by Eclipse Adoptium.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The default starter workflows are excellent starting points when creating your build and test workflow, and you can customize the starter workflow to suit your project’s needs.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This step uses the `actions/checkout` action to download a copy of your repository on the runner.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The name of the workflow. {% data variables.product.prodname_dotcom %} displays the names of your workflows under your repository's "Actions" tab. If you omit `name`, {% data variables.product.prodname_dotcom %} displays the workflow file path relative to the root of the repository.

0 commit comments

Comments
 (0)