diff --git a/assets/images/help/actions/starter-workflow-go.png b/assets/images/help/actions/starter-workflow-go.png new file mode 100644 index 0000000000..6e3701f7f5 Binary files /dev/null and b/assets/images/help/actions/starter-workflow-go.png differ diff --git a/content/actions/automating-builds-and-tests/building-and-testing-go.md b/content/actions/automating-builds-and-tests/building-and-testing-go.md index 3df9bdb168..af1ee913bb 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-go.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-go.md @@ -29,35 +29,59 @@ You should already be familiar with YAML syntax and how it's used with {% data v We recommend that you have a basic understanding of the Go language. For more information, see [Getting started with Go](https://golang.org/doc/tutorial/getting-started). -## Using the Go starter workflow +## Using a Go starter workflow -{% data variables.product.prodname_dotcom %} provides a Go starter workflow that should work for most Go projects. This guide includes examples that you can use to customize the starter workflow. For more information, see the [Go starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/go.yml). +{% data reusables.actions.starter-workflow-get-started %} -To get started quickly, add the starter workflow to the `.github/workflows` directory of your repository. +{% data variables.product.prodname_dotcom %} provides a Go starter workflow that should work for most Go projects. The subsequent sections of this guide give examples of how you can customize this starter workflow. -```yaml copy -name: Go package +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.actions-tab %} +{% data reusables.actions.new-starter-workflow %} +1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Search for "go". +1. Filter the selection of workflows by clicking **Continuous integration**. +1. On the "Go - by {% data variables.product.prodname_actions %}" workflow, click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}. -on: [push] + ![Screenshot of the "Choose a workflow" page. The "Configure" button on the "Go" workflow is highlighted with an orange outline.](/assets/images/help/actions/starter-workflow-go.png) -jobs: - build: +{%- ifversion ghes or ghae %} + If you don't find the "Go - by {% data variables.product.prodname_actions %}" starter workflow, copy the following workflow code to a new file called `go.yml` in the `.github/workflows` directory of your repository. - runs-on: ubuntu-latest - steps: - - uses: {% data reusables.actions.action-checkout %} + ```yaml copy + name: Go - - name: Set up Go - uses: {% data reusables.actions.action-setup-go %} - with: - go-version: '1.15' + on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] - - name: Build - run: go build -v ./... + jobs: + build: - - name: Test - run: go test -v ./... -``` + runs-on: self-hosted + steps: + - uses: {% data reusables.actions.action-checkout %} + + - name: Set up Go + uses: {% data reusables.actions.action-setup-go %} + with: + go-version: '1.20' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + ``` +{%- endif %} + +1. Edit the workflow as required. For example, change the version of Go. +1. Click **Commit changes**. + +{% ifversion fpt or ghec %} + The `go.yml` workflow file is added to the `.github/workflows` directory of your repository. +{% endif %} ## Specifying a Go version @@ -80,7 +104,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.14', '1.15', '1.16.x' ] + go-version: [ '1.19', '1.20', '1.21.x' ] steps: - uses: {% data reusables.actions.action-checkout %} @@ -95,14 +119,14 @@ jobs: ### Using a specific Go version -You can configure your job to use a specific version of Go, such as `1.16.2`. Alternatively, you can use semantic version syntax to get the latest minor release. This example uses the latest patch release of Go 1.16: +You can configure your job to use a specific version of Go, such as `1.20.8`. Alternatively, you can use semantic version syntax to get the latest minor release. This example uses the latest patch release of Go 1.21: ```yaml copy - - name: Setup Go 1.16.x + - name: Setup Go 1.21.x uses: {% data reusables.actions.action-setup-go %} with: # Semantic version range syntax or exact version of Go - go-version: '1.16.x' + go-version: '1.21.x' ``` ## Installing dependencies @@ -115,7 +139,7 @@ You can use `go get` to install dependencies: - name: Setup Go uses: {% data reusables.actions.action-setup-go %} with: - go-version: '1.16.x' + go-version: '1.21.x' - name: Install dependencies run: | go get . @@ -150,7 +174,7 @@ When caching is enabled, the `setup-go` action searches for the dependency file, - name: Setup Go uses: {% data reusables.actions.action-setup-go %} with: - go-version: '1.16.x' + go-version: '1.21.x' cache: true ``` @@ -187,7 +211,7 @@ jobs: - name: Setup Go uses: {% data reusables.actions.action-setup-go %} with: - go-version: '1.16.x' + go-version: '1.21.x' - name: Install dependencies run: go get . - name: Build @@ -213,7 +237,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.14', '1.15', '1.16.x' ] + go-version: [ '1.19', '1.20', '1.21.x' ] steps: - uses: {% data reusables.actions.action-checkout %} diff --git a/content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md b/content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md index 2d30b759b6..4532474d21 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-java-with-ant.md @@ -15,7 +15,6 @@ topics: - Java - Ant shortTitle: Build & test Java & Ant -layout: inline --- {% data reusables.actions.enterprise-github-hosted-runners %} @@ -40,39 +39,53 @@ We recommend that you have a basic understanding of Java and the Ant framework. {% data reusables.actions.enterprise-setup-prereq %} -## Using the Ant starter workflow +## Using an Ant starter workflow -{% 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 %} +{% data reusables.actions.starter-workflow-get-started %} -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)." +{% data variables.product.prodname_dotcom %} provides a starter workflow for Ant that should work for most Java with Ant projects. The subsequent sections of this guide give examples of how you can customize this starter workflow. -You can also add this workflow manually by creating a new file in the `.github/workflows` directory of your repository. +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.actions-tab %} +{% data reusables.actions.new-starter-workflow %} +1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Search for "Java with Ant". +1. On the "Java with Ant" workflow, click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}. -```yaml annotate copy -# {% data reusables.actions.workflows.workflow-syntax-name %} -name: Java CI +{%- ifversion ghes or ghae %} -# -on: [push] -# -jobs: - build: - {% data reusables.actions.example-github-runner-comment %} - runs-on: ubuntu-latest -# - steps: - {% data reusables.actions.workflows.workflow-checkout-step-explainer %} - - uses: {% data reusables.actions.action-checkout %} - {% data reusables.actions.workflows.setup-java-step-explainer %} - - name: Set up JDK 17 - uses: {% data reusables.actions.action-setup-java %} - with: - java-version: '17' - distribution: 'temurin' - # This step runs the default target in your `build.xml` file in non-interactive mode. - - name: Build with Ant - run: ant -noinput -buildfile build.xml -``` + If you don't find the "Java with Ant" starter workflow, copy the following workflow code to a new file called `ant.yml` in the `.github/workflows` directory of your repository. + + ```yaml copy + name: Java CI + + on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + + jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: {% data reusables.actions.action-checkout %} + - name: Set up JDK 11 + uses: {% data reusables.actions.action-setup-java %} + with: + java-version: '11' + distribution: 'temurin' + - name: Build with Ant + run: ant -noinput -buildfile build.xml + ``` +{%- endif %} + +1. Edit the workflow as required. For example, change the Java version. +1. Click **Commit changes**. + +{% ifversion fpt or ghec %} + The `ant.yml` workflow file is added to the `.github/workflows` directory of your repository. +{% endif %} {% data reusables.actions.java-jvm-architecture %} diff --git a/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md b/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md index 901eca1e6c..7cadce8fdd 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md @@ -15,7 +15,6 @@ topics: - Java - Gradle shortTitle: Build & test Java & Gradle -layout: inline --- {% data reusables.actions.enterprise-github-hosted-runners %} @@ -40,54 +39,61 @@ We recommend that you have a basic understanding of Java and the Gradle framewor {% data reusables.actions.enterprise-setup-prereq %} -## Using the Gradle starter workflow +## Using a Gradle starter workflow -{% 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 %} +{% data reusables.actions.starter-workflow-get-started %} -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)." +{% data variables.product.prodname_dotcom %} provides a starter workflow for Gradle that should work for most Java with Gradle projects. The subsequent sections of this guide give examples of how you can customize this starter workflow. -You can also add this workflow manually by creating a new file in the `.github/workflows` directory of your repository. +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.actions-tab %} +{% data reusables.actions.new-starter-workflow %} +1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Search for "Java with Gradle". +1. On the "Java with Gradle" workflow, click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}. -{% note %} +{%- ifversion ghes or ghae %} -**Notes:** + If you don't find the "Java with Gradle" starter workflow, copy the following workflow code to a new file called `gradle.yml` in the `.github/workflows` directory of your repository. -- {% data reusables.actions.actions-not-certified-by-github %} -- {% data reusables.actions.actions-use-sha-pinning %} + ```yaml copy + name: Java CI with Gradle -{% endnote %} + on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] -```yaml annotate copy -# {% data reusables.actions.workflows.workflow-syntax-name %} -name: Java CI + permissions: + contents: read -# -on: [push] -# -jobs: - build: + jobs: + build: + runs-on: ubuntu-latest - {% data reusables.actions.example-github-runner-comment %} - runs-on: ubuntu-latest -# - steps: - {% data reusables.actions.workflows.workflow-checkout-step-explainer %} - - uses: {% data reusables.actions.action-checkout %} - {% data reusables.actions.workflows.setup-java-step-explainer %} - - name: Set up JDK 17 - uses: {% data reusables.actions.action-setup-java %} - with: - java-version: '17' - distribution: 'temurin' - # The "Validate Gradle wrapper" step validates the checksums of Gradle Wrapper JAR files present in the source tree. - - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3 - # 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). - - name: Build with Gradle - uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 - with: - arguments: build -``` + steps: + - uses: {% data reusables.actions.action-checkout %} + - name: Set up JDK 11 + uses: {% data reusables.actions.action-setup-java %} + with: + java-version: '11' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 + with: + arguments: build + ``` +{%- endif %} + +1. Edit the workflow as required. For example, change the Java version. + + {% indented_data_reference reusables.actions.third-party-actions spaces=3 %} + +1. Click **Commit changes**. + +{% ifversion fpt or ghec %} + The `gradle.yml` workflow file is added to the `.github/workflows` directory of your repository. +{% endif %} {% data reusables.actions.java-jvm-architecture %} diff --git a/content/actions/automating-builds-and-tests/building-and-testing-java-with-maven.md b/content/actions/automating-builds-and-tests/building-and-testing-java-with-maven.md index afcbc75108..38e60bcddb 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-java-with-maven.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-java-with-maven.md @@ -15,7 +15,6 @@ topics: - Java - Maven shortTitle: Build & test Java with Maven -layout: inline --- {% data reusables.actions.enterprise-github-hosted-runners %} @@ -40,42 +39,58 @@ We recommend that you have a basic understanding of Java and the Maven framework {% data reusables.actions.enterprise-setup-prereq %} -## Using the Maven starter workflow +## Using a Maven starter workflow -{% data variables.product.prodname_dotcom %} provides a Maven starter workflow that will work for most Maven-based Java projects. For more information, see the [Maven starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/maven.yml). +{% data reusables.actions.starter-workflow-get-started %} -To get started quickly, you can choose the preconfigured Maven starter workflow when you create a new workflow. For more information, see the "[AUTOTITLE](/actions/quickstart)." +{% data variables.product.prodname_dotcom %} provides a starter workflow for Maven that should work for most Java with Maven projects. The subsequent sections of this guide give examples of how you can customize this starter workflow. -You can also add this workflow manually by creating a new file in the `.github/workflows` directory of your repository. +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.actions-tab %} +{% data reusables.actions.new-starter-workflow %} +1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Search for "Java with Maven". +1. On the "Java with Maven" workflow, click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}. -```yaml annotate copy -# {% data reusables.actions.workflows.workflow-syntax-name %} -name: Java CI +{%- ifversion ghes or ghae %} -# -on: [push] -# -jobs: - build: + If you don't find the "Java with Maven" starter workflow, copy the following workflow code to a new file called `maven.yml` in the `.github/workflows` directory of your repository. - {% data reusables.actions.example-github-runner-comment %} - runs-on: ubuntu-latest -# - steps: - {% data reusables.actions.workflows.workflow-checkout-step-explainer %} - - uses: {% data reusables.actions.action-checkout %} - {% data reusables.actions.workflows.setup-java-step-explainer %} - - name: Set up JDK 17 - uses: {% data reusables.actions.action-setup-java %} - with: - java-version: '17' - distribution: 'temurin' - # 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. - - name: Build with Maven - run: mvn --batch-mode --update-snapshots package -``` + ```yaml copy + name: Java CI with Maven -{% data reusables.actions.workflows.starter-workflows %} + on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: {% data reusables.actions.action-checkout %} + - name: Set up JDK 17 + uses: {% data reusables.actions.action-setup-java %} + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 + ``` +{%- endif %} + +1. Edit the workflow as required. For example, change the Java version. +1. Click **Commit changes**. + +{% ifversion fpt or ghec %} + The `maven.yml` workflow file is added to the `.github/workflows` directory of your repository. +{% endif %} {% data reusables.actions.java-jvm-architecture %} diff --git a/content/actions/automating-builds-and-tests/building-and-testing-net.md b/content/actions/automating-builds-and-tests/building-and-testing-net.md index 5ba8c4ab28..c0805a0855 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-net.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-net.md @@ -27,38 +27,56 @@ You should already be familiar with YAML syntax and how it's used with {% data v We recommend that you have a basic understanding of the .NET Core SDK. For more information, see [Getting started with .NET](https://dotnet.microsoft.com/learn). -## Using the .NET starter workflow +## Using a .NET starter workflow -{% data variables.product.prodname_dotcom %} provides a .NET starter workflow that should work for most .NET projects, and this guide includes examples that show you how to customize this starter workflow. For more information, see the [.NET starter workflow](https://github.com/actions/setup-dotnet). +{% data reusables.actions.starter-workflow-get-started %} -To get started quickly, add the starter workflow to the `.github/workflows` directory of your repository. +{% data variables.product.prodname_dotcom %} provides a starter workflow for .NET that should work for most .NET projects. The subsequent sections of this guide give examples of how you can customize this starter workflow. -```yaml -name: dotnet package +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.actions-tab %} +{% data reusables.actions.new-starter-workflow %} +1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Search for "dotnet". +1. On the ".NET" workflow, click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}. -on: [push] +{%- ifversion ghes or ghae %} -jobs: - build: + If you don't find the ".NET" starter workflow, copy the following workflow code to a new file called `dotnet.yml` in the `.github/workflows` directory of your repository. - runs-on: ubuntu-latest - strategy: - matrix: - dotnet-version: [ '3.1.x', '6.0.x' ] + ```yaml copy + name: .NET - steps: - - uses: {% data reusables.actions.action-checkout %} - - name: Setup .NET Core SDK {% raw %}${{ matrix.dotnet-version }}{% endraw %} - uses: {% data reusables.actions.action-setup-dotnet %} - with: - dotnet-version: {% raw %}${{ matrix.dotnet-version }}{% endraw %} - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Test - run: dotnet test --no-restore --verbosity normal -``` + on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: {% data reusables.actions.action-checkout %} + - name: Setup .NET + uses: {% data reusables.actions.action-setup-dotnet %} + with: + dotnet-version: 6.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal + ``` +{%- endif %} + +1. Edit the workflow as required. For example, change the .NET version. +1. Click **Commit changes**. + +{% ifversion fpt or ghec %} + The `dotnet.yml` workflow file is added to the `.github/workflows` directory of your repository. +{% endif %} ## Specifying a .NET version diff --git a/content/actions/automating-builds-and-tests/building-and-testing-nodejs.md b/content/actions/automating-builds-and-tests/building-and-testing-nodejs.md index ce54e03982..12d66d253d 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-nodejs.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-nodejs.md @@ -16,7 +16,6 @@ topics: - Node - JavaScript shortTitle: Build & test Node.js -layout: inline --- {% data reusables.actions.enterprise-github-hosted-runners %} @@ -34,52 +33,60 @@ We recommend that you have a basic understanding of Node.js, YAML, workflow conf {% data reusables.actions.enterprise-setup-prereq %} -## Using the Node.js starter workflow +## Using a Node.js starter workflow -{% 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). +{% data reusables.actions.starter-workflow-get-started %} -{% data reusables.actions.workflows.starter-workflows %} +{% data variables.product.prodname_dotcom %} provides a starter workflow for Node.js that should work for most Node.js projects. The subsequent sections of this guide give examples of how you can customize this starter workflow. -To get started quickly, add the starter workflow to the `.github/workflows` directory of your repository. +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.actions-tab %} +{% data reusables.actions.new-starter-workflow %} +1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Search for "Node.js". +1. Filter the selection of workflows by clicking **Continuous integration**. +1. On the "Node.js" workflow, click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}. -```yaml annotate copy -# {% data reusables.actions.workflows.workflow-syntax-name %} -name: Node.js CI +{%- ifversion ghes or ghae %} -# 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. -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + If you don't find the "Node.js" starter workflow, copy the following workflow code to a new file called `node.js.yml` in the `.github/workflows` directory of your repository. -# -jobs: - build: + ```yaml copy + name: Node.js CI - {% data reusables.actions.example-github-runner-comment %} - runs-on: ubuntu-latest + on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] - # 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)." - strategy: - matrix: - node-version: [14.x, 16.x, 18.x, 20.x] -# - steps: - {% data reusables.actions.workflows.workflow-checkout-step-explainer %} - - uses: {% data reusables.actions.action-checkout %} - # This step uses the `actions/setup-node` action to set up Node.js for each version indicated by the `matrix.node-version` key above. - - name: Use Node.js {% raw %}${{ matrix.node-version }}{% endraw %} - uses: {% data reusables.actions.action-setup-node %} - with: - node-version: {% raw %}${{ matrix.node-version }}{% endraw %} - # This step runs `npm ci` to install any dependencies listed in your `package.json` file. - - run: npm ci - # This step runs the `build` script if there is one specified under the `scripts` key in your `package.json` file. - - run: npm run build --if-present - # This step runs the `test` script that is specified under the `scripts` key in your `package.json` file. - - run: npm test -``` + jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: {% data reusables.actions.action-checkout %} + - name: Use Node.js {% raw %}${{ matrix.node-version }}{% endraw %} + uses: {% data reusables.actions.action-setup-node %} + with: + node-version: {% raw %}${{ matrix.node-version }}{% endraw %} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + ``` +{%- endif %} + +1. Edit the workflow as required. For example, change the Node versions you want to use. +1. Click **Commit changes**. + +{% ifversion fpt or ghec %} + The `node.js.yml` workflow file is added to the `.github/workflows` directory of your repository. +{% endif %} ## Specifying the Node.js version @@ -87,14 +94,14 @@ The easiest way to specify a Node.js version is by using the `setup-node` action The `setup-node` action takes a Node.js version as an input and configures that version on the runner. The `setup-node` action finds a specific version of Node.js from the tools cache on each runner and adds the necessary binaries to `PATH`, which persists for the rest of the job. Using the `setup-node` action is the recommended way of using Node.js with {% data variables.product.prodname_actions %} because it ensures consistent behavior across different runners and different versions of Node.js. If you are using a self-hosted runner, you must install Node.js and add it to `PATH`. -The starter workflow includes a matrix strategy that builds and tests your code with four Node.js versions: 14.x, 16.x, 18.x, and 20.x. The 'x' is a wildcard character that matches the latest minor and patch release available for a version. Each version of Node.js specified in the `node-version` array creates a job that runs the same steps. +The starter workflow includes a matrix strategy that builds and tests your code with the Node.js versions listed in `node-version`. The 'x' in the version number is a wildcard character that matches the latest minor and patch release available for a version. Each version of Node.js specified in the `node-version` array creates a job that runs the same steps. Each job can access the value defined in the matrix `node-version` array using the `matrix` context. The `setup-node` action uses the context as the `node-version` input. The `setup-node` action configures each job with a different Node.js version before building and testing code. For more information about matrix strategies and contexts, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix)" and "[AUTOTITLE](/actions/learn-github-actions/contexts)." ```yaml copy strategy: matrix: - node-version: [14.x, 16.x, 18.x, 20.x] + node-version: [14.x, 16.x, 18.x] steps: - uses: {% data reusables.actions.action-checkout %} diff --git a/content/actions/automating-builds-and-tests/building-and-testing-python.md b/content/actions/automating-builds-and-tests/building-and-testing-python.md index 0113e28b92..8f4ea5a687 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-python.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-python.md @@ -39,46 +39,67 @@ We recommend that you have a basic understanding of Python, PyPy, and pip. For m {% data reusables.actions.enterprise-setup-prereq %} -## Using the Python starter workflow +## Using a Python starter workflow -{% data variables.product.prodname_dotcom %} provides a Python starter workflow that should work for most Python projects. This guide includes examples that you can use to customize the starter workflow. For more information, see the [Python starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml). +{% data reusables.actions.starter-workflow-get-started %} -To get started quickly, add the starter workflow to the `.github/workflows` directory of your repository. +{% data variables.product.prodname_dotcom %} provides a starter workflow for Python that should work for most Python projects. The subsequent sections of this guide give examples of how you can customize this starter workflow. -```yaml copy -name: Python package +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.actions-tab %} +{% data reusables.actions.new-starter-workflow %} +1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Search for "Python application". +1. On the "Python application" workflow, click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}. -on: [push] +{%- ifversion ghes or ghae %} -jobs: - build: + If you don't find the "Python application" starter workflow, copy the following workflow code to a new file called `python-app.yml` in the `.github/workflows` directory of your repository. - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + ```yaml copy + name: Python application - steps: - - uses: {% data reusables.actions.action-checkout %} - - name: Set up Python {% raw %}${{ matrix.python-version }}{% endraw %} - uses: {% data reusables.actions.action-setup-python %} - with: - python-version: {% raw %}${{ matrix.python-version }}{% endraw %} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install ruff pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with ruff - run: | - # stop the build if there are Python syntax errors or undefined names - ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 . - # default set of ruff rules with GitHub Annotations - ruff --format=github --target-version=py37 . - - name: Test with pytest - run: | - pytest -``` + on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + permissions: + contents: read + + jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: {% data reusables.actions.action-checkout %} + - name: Set up Python 3.10 + uses: {% data reusables.actions.action-setup-python %} + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest + ``` +{%- endif %} + +1. Edit the workflow as required. For example, change the Python version. +1. Click **Commit changes**. + +{% ifversion fpt or ghec %} + The `python-app.yml` workflow file is added to the `.github/workflows` directory of your repository. +{% endif %} ## Specifying a Python version diff --git a/content/actions/automating-builds-and-tests/building-and-testing-ruby.md b/content/actions/automating-builds-and-tests/building-and-testing-ruby.md index 95a81e63af..e564bdd81f 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-ruby.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-ruby.md @@ -28,41 +28,66 @@ We recommend that you have a basic understanding of Ruby, YAML, workflow configu - [Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions) - [Ruby in 20 minutes](https://www.ruby-lang.org/en/documentation/quickstart/) -## Using the Ruby starter workflow +## Using a Ruby starter workflow -{% data variables.product.prodname_dotcom %} provides a Ruby starter workflow that will work for most Ruby projects. For more information, see the [Ruby starter workflow](https://github.com/actions/starter-workflows/blob/master/ci/ruby.yml). +{% data reusables.actions.starter-workflow-get-started %} -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`. +{% data variables.product.prodname_dotcom %} provides a starter workflow for Ruby that should work for most Ruby projects. The subsequent sections of this guide give examples of how you can customize this starter workflow. -```yaml -{% data reusables.actions.actions-not-certified-by-github-comment %} +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.actions-tab %} +{% data reusables.actions.new-starter-workflow %} +1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Search for "ruby". +1. Filter the selection of workflows by clicking **Continuous integration**. +1. On the "Ruby" workflow, click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}. -{% data reusables.actions.actions-use-sha-pinning-comment %} +{%- ifversion ghes or ghae %} -name: Ruby + If you don't find the "Ruby" starter workflow, copy the following workflow code to a new file called `ruby.yml` in the `.github/workflows` directory of your repository. -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + ```yaml copy + name: Ruby -jobs: - test: + on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] - runs-on: ubuntu-latest + permissions: + contents: read - steps: - - uses: {% data reusables.actions.action-checkout %} - - name: Set up Ruby - uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 - with: - ruby-version: '3.1' - - name: Install dependencies - run: bundle install - - name: Run tests - run: bundle exec rake -``` + jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['2.6', '2.7', '3.0'] + + steps: + - uses: {% data reusables.actions.action-checkout %} + - name: Set up Ruby + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, + # change this to (see https://github.com/ruby/setup-ruby#versioning): + # uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + with: + ruby-version: {% raw %}${{ matrix.ruby-version }}{% endraw %} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: bundle exec rake + ``` +{%- endif %} + +1. Edit the workflow as required. For example, change the Ruby versions you want to use. + + {% indented_data_reference reusables.actions.third-party-actions spaces=3 %} + +1. Click **Commit changes**. + +{% ifversion fpt or ghec %} + The `ruby.yml` workflow file is added to the `.github/workflows` directory of your repository. +{% endif %} ## Specifying the Ruby version diff --git a/content/actions/automating-builds-and-tests/building-and-testing-swift.md b/content/actions/automating-builds-and-tests/building-and-testing-swift.md index 329088898e..efa8a7ce96 100644 --- a/content/actions/automating-builds-and-tests/building-and-testing-swift.md +++ b/content/actions/automating-builds-and-tests/building-and-testing-swift.md @@ -30,29 +30,51 @@ You should already be familiar with YAML syntax and how it's used with {% data v We recommend that you have a basic understanding of Swift packages. For more information, see "[Swift Packages](https://developer.apple.com/documentation/swift_packages)" in the Apple developer documentation. -## Using the Swift starter workflow +## Using a Swift starter workflow -{% data variables.product.prodname_dotcom %} provides a Swift starter workflow that should work for most Swift projects, and this guide includes examples that show you how to customize this starter workflow. For more information, see the [Swift starter workflow](https://github.com/actions/starter-workflows/blob/main/ci/swift.yml). +{% data reusables.actions.starter-workflow-get-started %} -To get started quickly, add the starter workflow to the `.github/workflows` directory of your repository. +{% data variables.product.prodname_dotcom %} provides a starter workflow for Swift that should work for most Swift projects. The subsequent sections of this guide give examples of how you can customize this starter workflow. -```yaml copy -name: Swift +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.actions-tab %} +{% data reusables.actions.new-starter-workflow %} +1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Search for "swift". +1. Filter the selection of workflows by clicking **Continuous integration**. +1. On the "Swift" workflow, click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}. -on: [push] +{%- ifversion ghes or ghae %} -jobs: - build: + If you don't find the "Swift" starter workflow, copy the following workflow code to a new file called `swift.yml` in the `.github/workflows` directory of your repository. - runs-on: macos-latest + ```yaml copy + name: Swift - steps: - - uses: {% data reusables.actions.action-checkout %} - - name: Build - run: swift build - - name: Run tests - run: swift test -``` + on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + jobs: + build: + runs-on: macos-latest + + steps: + - uses: {% data reusables.actions.action-checkout %} + - name: Build + run: swift build -v + - name: Run tests + run: swift test -v + ``` +{%- endif %} + +1. Edit the workflow as required. For example, change the branch on which the workflow will run. +1. Click **Commit changes**. + +{% ifversion fpt or ghec %} + The `swift.yml` workflow file is added to the `.github/workflows` directory of your repository. +{% endif %} ## Specifying a Swift version diff --git a/content/actions/guides.md b/content/actions/guides.md index d8eef08493..5bb2119b07 100644 --- a/content/actions/guides.md +++ b/content/actions/guides.md @@ -18,7 +18,7 @@ includeGuides: - /actions/quickstart - /actions/learn-github-actions/understanding-github-actions - /actions/creating-actions/creating-a-docker-container-action - - /actions/using-workflows/using-starter-workflows + - /actions/learn-github-actions/using-starter-workflows - /actions/automating-builds-and-tests/building-and-testing-python - /actions/automating-builds-and-tests/building-and-testing-nodejs - /actions/publishing-packages/about-packaging-with-github-actions diff --git a/content/actions/index.md b/content/actions/index.md index ea174d1392..55ced81c7b 100644 --- a/content/actions/index.md +++ b/content/actions/index.md @@ -14,7 +14,7 @@ featuredLinks: - /actions/publishing-packages/about-packaging-with-github-actions - /actions/monitoring-and-troubleshooting-workflows/about-monitoring-and-troubleshooting guideCards: - - /actions/using-workflows/using-starter-workflows + - /actions/learn-github-actions/using-starter-workflows - /actions/publishing-packages/publishing-nodejs-packages - /actions/automating-builds-and-tests/building-and-testing-powershell popular: diff --git a/content/actions/learn-github-actions/index.md b/content/actions/learn-github-actions/index.md index 09c0ffd0ae..04e75357af 100644 --- a/content/actions/learn-github-actions/index.md +++ b/content/actions/learn-github-actions/index.md @@ -25,6 +25,7 @@ children: - /expressions - /contexts - /variables + - /using-starter-workflows - /usage-limits-billing-and-administration --- diff --git a/content/actions/using-workflows/using-starter-workflows.md b/content/actions/learn-github-actions/using-starter-workflows.md similarity index 73% rename from content/actions/using-workflows/using-starter-workflows.md rename to content/actions/learn-github-actions/using-starter-workflows.md index 58b378fdcd..e487eb91bd 100644 --- a/content/actions/using-workflows/using-starter-workflows.md +++ b/content/actions/learn-github-actions/using-starter-workflows.md @@ -9,7 +9,7 @@ redirect_from: - /actions/building-and-testing-code-with-continuous-integration/setting-up-continuous-integration-using-github-actions - /actions/guides/setting-up-continuous-integration-using-workflow-templates - /actions/learn-github-actions/using-workflow-templates - - /actions/learn-github-actions/using-starter-workflows + - /actions/using-workflows/using-starter-workflows versions: fpt: '*' ghes: '*' @@ -26,21 +26,24 @@ topics: ## About starter workflows -{% data variables.product.product_name %} offers starter workflows for a variety of languages and tooling. When you set up workflows in your repository, {% data variables.product.product_name %} analyzes the code in your repository and recommends workflows based on the language and framework in your repository. For example, if you use [Node.js](https://nodejs.org/en/), {% data variables.product.product_name %} will suggest a starter workflow file that installs your Node.js packages and runs your tests.{% ifversion actions-starter-template-ui %} You can search and filter to find relevant starter workflows.{% endif %} +Starter workflows are templates that help you to create your own {% data variables.product.prodname_actions %} workflows for a repository. They offer an alternative to starting from a blank workflow file and are useful because some of the work will already have been done for you. + +{% data variables.product.product_name %} offers starter workflows for a variety of languages and tooling. When you set up workflows in your repository, {% data variables.product.product_name %} analyzes the code in your repository and recommends workflows based on the language and framework in your repository. For example, if you use Node.js, {% data variables.product.product_name %} will suggest a starter workflow file that installs your Node.js packages and runs your tests.{% ifversion actions-starter-template-ui %} You can search and filter to find relevant starter workflows.{% endif %} {% data reusables.actions.starter-workflow-categories %} -You can also create your own starter workflow to share with your organization. These starter workflows will appear alongside the {% data variables.product.product_name %}-provided starter workflows. For more information, see "[AUTOTITLE](/actions/using-workflows/creating-starter-workflows-for-your-organization)." +You can also create your own starter workflow to share with your organization. These starter workflows will appear alongside the {% data variables.product.product_name %}-provided starter workflows. Anyone with write access to the organization's `github` repository can set up a starter workflow. For more information, see "[AUTOTITLE](/actions/using-workflows/creating-starter-workflows-for-your-organization)." -## Using starter workflows - -Anyone with write permission to a repository can set up {% data variables.product.prodname_actions %} starter workflows for CI/CD or other automation. +## Choosing and using a starter workflow {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} -1. If you already have a workflow in your repository, click **New workflow**. +{% data reusables.actions.new-starter-workflow %} 1. The "{% ifversion actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Find the starter workflow that you want to use, then click {% ifversion actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}.{% ifversion actions-starter-template-ui %} To help you find the starter workflow that you want, you can search for keywords or filter by category.{% endif %} -1. If the starter workflow contains comments detailing additional setup steps, follow these steps. Many of the starter workflow have corresponding guides. For more information, see the [{% data variables.product.prodname_actions %} guides](/actions/guides). +1. If the starter workflow contains comments detailing additional setup steps, follow these steps. + + There are guides to accompany many of the starter workflows for building and testing projects. For more information, see "[AUTOTITLE](/actions/automating-builds-and-tests)." + 1. Some starter workflows use secrets. For example, {% raw %}`${{ secrets.npm_token }}`{% endraw %}. If the starter workflow uses a secret, store the value described in the secret name as a secret in your repository. For more information, see "[AUTOTITLE](/actions/security-guides/using-secrets-in-github-actions)." 1. Optionally, make additional changes. For example, you might want to change the value of `on` to change when the workflow runs. 1. Click **Start commit**. @@ -51,7 +54,6 @@ Anyone with write permission to a repository can set up {% data variables.produc - "[AUTOTITLE](/actions/automating-builds-and-tests/about-continuous-integration)" - "[AUTOTITLE](/actions/managing-workflow-runs)" - "[AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/about-monitoring-and-troubleshooting)" -- "[AUTOTITLE](/actions/learn-github-actions)" {% ifversion fpt or ghec %} - "[AUTOTITLE](/billing/managing-billing-for-github-actions)" {% endif %} diff --git a/content/actions/using-workflows/about-workflows.md b/content/actions/using-workflows/about-workflows.md index 939b242fe6..25a5444ccd 100644 --- a/content/actions/using-workflows/about-workflows.md +++ b/content/actions/using-workflows/about-workflows.md @@ -50,7 +50,7 @@ For more on managing workflow runs, such as re-running, cancelling, or deleting {% data reusables.actions.workflow-template-overview %} -For more information on using and creating starter workflows, see "[AUTOTITLE](/actions/using-workflows/using-starter-workflows)" and "[AUTOTITLE](/actions/using-workflows/creating-starter-workflows-for-your-organization)." +For more information on using and creating starter workflows, see "[AUTOTITLE](/actions/learn-github-actions/using-starter-workflows)" and "[AUTOTITLE](/actions/using-workflows/creating-starter-workflows-for-your-organization)." ## Advanced workflow features diff --git a/content/actions/using-workflows/creating-starter-workflows-for-your-organization.md b/content/actions/using-workflows/creating-starter-workflows-for-your-organization.md index f8ba3b516a..d07eda50be 100644 --- a/content/actions/using-workflows/creating-starter-workflows-for-your-organization.md +++ b/content/actions/using-workflows/creating-starter-workflows-for-your-organization.md @@ -114,4 +114,4 @@ To add another starter workflow, add your files to the same `workflow-templates` ## Next steps -To continue learning about {% data variables.product.prodname_actions %}, see "[AUTOTITLE](/actions/using-workflows/using-starter-workflows)." +To continue learning about {% data variables.product.prodname_actions %}, see "[AUTOTITLE](/actions/learn-github-actions/using-starter-workflows)." diff --git a/content/actions/using-workflows/index.md b/content/actions/using-workflows/index.md index 558dbb8e19..5b6763c715 100644 --- a/content/actions/using-workflows/index.md +++ b/content/actions/using-workflows/index.md @@ -33,7 +33,6 @@ children: - /caching-dependencies-to-speed-up-workflows - /storing-workflow-data-as-artifacts - /creating-starter-workflows-for-your-organization - - /using-starter-workflows - /sharing-workflows-secrets-and-runners-with-your-organization - /using-github-cli-in-workflows --- diff --git a/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning.md b/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning.md index b8a03c07af..1729548412 100644 --- a/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning.md +++ b/content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning.md @@ -163,7 +163,7 @@ For information on bulk enablement, see "[AUTOTITLE](/code-security/code-scannin ![Screenshot showing a starter workflow file open for editing. The "Documentation" button is highlighted with an orange outline.](/assets/images/help/security/actions-workflows-documentation.png) - For more information, see "[AUTOTITLE](/actions/using-workflows/using-starter-workflows#using-starter-workflows)" and "[AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning)." + For more information, see "[AUTOTITLE](/actions/learn-github-actions/using-starter-workflows#choosing-and-using-a-starter-workflow)" and "[AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning)." {% endif %} {% ifversion ghes < 3.5 %} diff --git a/content/contributing/writing-for-github-docs/content-model.md b/content/contributing/writing-for-github-docs/content-model.md index f53828ce90..013539a1e3 100644 --- a/content/contributing/writing-for-github-docs/content-model.md +++ b/content/contributing/writing-for-github-docs/content-model.md @@ -251,7 +251,7 @@ For the procedural content template, see "[AUTOTITLE](/contributing/writing-for- #### Examples of procedural content - [AUTOTITLE](/free-pro-team@latest/billing/managing-your-github-billing-settings/adding-information-to-your-receipts) - [AUTOTITLE](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise) -- [AUTOTITLE](/actions/using-workflows/using-starter-workflows) +- [AUTOTITLE](/actions/learn-github-actions/using-starter-workflows) ### Release notes diff --git a/content/get-started/learning-about-github/about-github-advanced-security.md b/content/get-started/learning-about-github/about-github-advanced-security.md index fce66ddd4d..46ba04c835 100644 --- a/content/get-started/learning-about-github/about-github-advanced-security.md +++ b/content/get-started/learning-about-github/about-github-advanced-security.md @@ -106,7 +106,7 @@ If you have an enterprise account, license use for the entire enterprise is show {% data reusables.advanced-security.starter-workflows-beta %} {% data reusables.advanced-security.starter-workflow-overview %} -For more information on starter workflows, see "[AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning#configuring-code-scanning-using-third-party-actions)" and "[AUTOTITLE](/actions/using-workflows/using-starter-workflows)." +For more information on starter workflows, see "[AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning#configuring-code-scanning-using-third-party-actions)" and "[AUTOTITLE](/actions/learn-github-actions/using-starter-workflows)." {% endif %} diff --git a/content/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.md b/content/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.md index 88d785f478..7611149cfa 100644 --- a/content/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.md +++ b/content/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.md @@ -26,7 +26,7 @@ To use the action place this snippet under your `jobs` in the desired workflow. uses: actions/configure-pages@v3 ``` -This action helps support deployment from any static site generator to {% data variables.product.prodname_pages %}. To make this process less repetitive you can use starter workflows for some of the most widely used static site generators. For more information, see "[AUTOTITLE](/actions/using-workflows/using-starter-workflows)." +This action helps support deployment from any static site generator to {% data variables.product.prodname_pages %}. To make this process less repetitive you can use starter workflows for some of the most widely used static site generators. For more information, see "[AUTOTITLE](/actions/learn-github-actions/using-starter-workflows)." ## Configuring the `upload-pages-artifact` action diff --git a/data/reusables/actions/cd-templates-actions.md b/data/reusables/actions/cd-templates-actions.md index 595e0f554c..06ea6b1a5a 100644 --- a/data/reusables/actions/cd-templates-actions.md +++ b/data/reusables/actions/cd-templates-actions.md @@ -1,3 +1,3 @@ -{% data variables.product.product_name %} offers deployment starter workflows for several popular services, such as Azure Web App. To learn how to get started using a starter workflow, see "[AUTOTITLE](/actions/using-workflows/using-starter-workflows)" or [browse the full list of deployment starter workflows](https://github.com/actions/starter-workflows/tree/main/deployments). You can also check out our more detailed guides for specific deployment workflows, such as "[AUTOTITLE](/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service)." +{% data variables.product.product_name %} offers deployment starter workflows for several popular services, such as Azure Web App. To learn how to get started using a starter workflow, see "[AUTOTITLE](/actions/learn-github-actions/using-starter-workflows)" or [browse the full list of deployment starter workflows](https://github.com/actions/starter-workflows/tree/main/deployments). You can also check out our more detailed guides for specific deployment workflows, such as "[AUTOTITLE](/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service)." Many service providers also offer actions on {% data variables.product.prodname_marketplace %} for deploying to their service. For the full list, see [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace?category=deployment&type=actions). diff --git a/data/reusables/actions/java-jvm-architecture.md b/data/reusables/actions/java-jvm-architecture.md index 6e0d88e2b4..8a00e84de6 100644 --- a/data/reusables/actions/java-jvm-architecture.md +++ b/data/reusables/actions/java-jvm-architecture.md @@ -1,4 +1,4 @@ -### Specifying the JVM version and architecture +### Specifying the Java version and architecture The starter workflow sets up the `PATH` to contain OpenJDK 8 for the x64 platform. If you want to use a different version of Java, or target a different architecture (`x64` or `x86`), you can use the `setup-java` action to choose a different Java runtime environment. diff --git a/data/reusables/actions/new-starter-workflow.md b/data/reusables/actions/new-starter-workflow.md new file mode 100644 index 0000000000..ea39765884 --- /dev/null +++ b/data/reusables/actions/new-starter-workflow.md @@ -0,0 +1 @@ +1. If you already have a workflow in your repository, click **New workflow**. \ No newline at end of file diff --git a/data/reusables/actions/onboarding-next-steps.md b/data/reusables/actions/onboarding-next-steps.md index d4365f2d7d..c62513544b 100644 --- a/data/reusables/actions/onboarding-next-steps.md +++ b/data/reusables/actions/onboarding-next-steps.md @@ -1,5 +1,6 @@ {% data variables.product.prodname_actions %} can help you automate nearly every aspect of your application development processes. Ready to get started? Here are some helpful resources for taking your next steps with {% data variables.product.prodname_actions %}: +- For a quick way to create a {% data variables.product.prodname_actions %} workflow, see "[AUTOTITLE](/actions/learn-github-actions/using-starter-workflows)." - For continuous integration (CI) workflows to build and test your code, see "[AUTOTITLE](/actions/automating-builds-and-tests)." - For building and publishing packages, see "[AUTOTITLE](/actions/publishing-packages)." - For deploying projects, see "[AUTOTITLE](/actions/deployment)." diff --git a/data/reusables/actions/starter-workflow-get-started.md b/data/reusables/actions/starter-workflow-get-started.md new file mode 100644 index 0000000000..564434f149 --- /dev/null +++ b/data/reusables/actions/starter-workflow-get-started.md @@ -0,0 +1 @@ +To get started quickly, add a starter workflow to the `.github/workflows` directory of your repository. \ No newline at end of file diff --git a/data/reusables/actions/third-party-actions.md b/data/reusables/actions/third-party-actions.md new file mode 100644 index 0000000000..136b9603d0 --- /dev/null +++ b/data/reusables/actions/third-party-actions.md @@ -0,0 +1,8 @@ +{% note %} + +**Notes**: + +- This starter workflow contains an action that is not certified by {% data variables.product.prodname_dotcom %}. Actions provided by third parties are governed by separate terms of service, privacy policy, and support documentation. +- If you use actions from third parties you should use a version specified by a commit SHA. If the action is revised and you want to use the newer version, you will need to update the SHA. You can specify a version by referencing a tag or a branch, however the action may change without warning. For more information, see "[AUTOTITLE](/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions)." + +{% endnote %} \ No newline at end of file