Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/allowed-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module.exports = [
"actions/cache@0781355a23dac32fd3bac414512f4b903437991a", // v2.1.3
"actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f", // v2.3.4
"actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9", // v3.0.0
"actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d", // v4.0.2
"actions/labeler@5f867a63be70efff62b767459b009290364495eb", // v2.2.0
"actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e", // v2.1.4
"actions/setup-python@dc73133d4da04e56a135ae2246682783cc7c7cb6", // v2.2.2
Expand All @@ -29,7 +29,7 @@ module.exports = [
"lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8",
"lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb",
"pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07", // v0.12.0
"peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326",
"peter-evans/create-issue-from-file@b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e",
"peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd",
"peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43",
"rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-all-english-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- if: ${{ failure() }}
name: Create issue from file
id: broken-link-report
uses: peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326
uses: peter-evans/create-issue-from-file@b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e
with:
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
title: ${{ steps.check.outputs.title }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-for-spammy-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: github.repository == 'github/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
- uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/confirm-internal-staff-work-in-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: github.repository == 'github/docs' && github.actor != 'docs-bot'
steps:
- id: membership_check
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
env:
TEAM_CONTENT_REPO: ${{ secrets.TEAM_CONTENT_REPO }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copy-api-issue-to-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.event.label.name == 'rest-description' && github.repository == 'github/docs'
steps:
- name: Check if this run was triggered by a member of the docs team
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
id: triggered-by-member
with:
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/first-responder-docs-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Check if the event originated from a team member
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
id: set-result
with:
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:

steps:
- name: Remove card from project
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
result-encoding: string
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merged-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: github.repository == 'github/docs' && github.event.pull_request.merged && github.event.pull_request.base.ref == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
- uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
script: |
github.issues.createComment({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: move_to_correct_repo
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
env:
TEAM_ENGINEERING_REPO: ${{ secrets.TEAM_ENGINEERING_REPO }}
TEAM_CONTENT_REPO: ${{ secrets.TEAM_CONTENT_REPO }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/move-new-issues-to-correct-docs-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
if: github.repository == 'github/docs-internal'
steps:
- id: move_to_correct_repo
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
env:
TEAM_ENGINEERING_REPO: ${{ secrets.TEAM_ENGINEERING_REPO }}
TEAM_CONTENT_REPO: ${{ secrets.TEAM_CONTENT_REPO }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/move-reopened-issues-to-triage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: github.repository == 'github/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
- uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{ github.token }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo-sync-stalls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
name: Check if repo sync is stalled
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
script: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Close pull request if unwanted
if: ${{ github.repository == 'github/docs' && steps.find-pull-request.outputs.number }}
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{ secrets.DOCS_BOT_SPAM_VISION }}
script: |
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
# There are cases where the branch becomes out-of-date in between the time this workflow began and when the pull request is created/updated
- name: Update branch
if: ${{ steps.find-pull-request.outputs.number }}
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
script: |
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:

- name: Enable GitHub auto-merge
if: ${{ steps.find-pull-request.outputs.number }}
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/start-new-engineering-pr-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
DRAFT_COLUMN_ID: 10095775
REGULAR_COLUMN_ID: 10095779
steps:
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
- uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
continue-on-error: true
with:
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/transfer-api-issue-to-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.event.label.name == 'rest-schema' && github.repository == 'github/docs'
steps:
- name: Check if this run was triggered by a member of the docs team
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
id: triggered-by-member
with:
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
state: open
- if: ${{ steps.pr.outputs.number }}
name: Check if already labeled
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
id: has-label
with:
script: |
Expand All @@ -51,7 +51,7 @@ jobs:
number: ${{ steps.pr.outputs.number }}
- if: ${{ !steps.has-label.outputs.result }}
name: Add automerge label
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/triage-issue-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Check if the event originated from a team member
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
id: is-internal-contributor
with:
github-token: ${{secrets.GITHUB_TOKEN}}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/triage-unallowed-contributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Check for existing requested changes
id: requested-change
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: json
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Request pull request changes
# Check for no reviews or reviews that aren't CHANGES_REQUESTED
if: ${{ steps.filter.outputs.notAllowed == 'true' && (!steps.requested-change.outputs.result || fromJson(steps.requested-change.outputs.result).state != 'CHANGES_REQUESTED') }}
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
# Check that unallowed files aren't modified and that a
# CHANGES_REQUESTED review already exists
if: ${{ steps.filter.outputs.notAllowed == 'false' && steps.requested-change.outputs.result && fromJson(steps.requested-change.outputs.result).state == 'CHANGES_REQUESTED' }}
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: Finding and customizing actions
shortTitle: Finding and customizing actions
intro: 'Actions are the building blocks that power your workflow. A workflow can contain actions created by the community, or you can create your own actions directly within your application''s repository. This guide will show you how to discover, use, and customize actions.'
intro: "Actions are the building blocks that power your workflow. A workflow can contain actions created by the community, or you can create your own actions directly within your application's repository. This guide will show you how to discover, use, and customize actions."
redirect_from:
- /actions/automating-your-workflow-with-github-actions/using-github-marketplace-actions
- /actions/automating-your-workflow-with-github-actions/using-actions-from-github-marketplace-in-your-workflow
- /actions/getting-started-with-github-actions/using-actions-from-github-marketplace
- /actions/getting-started-with-github-actions/using-community-workflows-and-actions
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
github-ae: '*'
free-pro-team: "*"
enterprise-server: ">=2.22"
github-ae: "*"
type: how_to
topics:
- Fundamentals
Expand All @@ -28,32 +28,32 @@ The actions you use in your workflow can be defined in:
- The same repository where your workflow file references the action
- A published Docker container image on Docker Hub

{% data variables.product.prodname_marketplace %} is a central location for you to find actions created by the {% data variables.product.prodname_dotcom %} community. [{% data variables.product.prodname_marketplace %} page](https://github.com/marketplace/actions/) enables you to filter for actions by category.
{% data variables.product.prodname_marketplace %} is a central location for you to find actions created by the {% data variables.product.prodname_dotcom %} community.{% if currentVersion == "free-pro-team@latest" %} [{% data variables.product.prodname_marketplace %} page](https://github.com/marketplace/actions/) enables you to filter for actions by category. {% endif %}

{% data reusables.actions.enterprise-marketplace-actions %}

{% if currentVersion == "free-pro-team@latest" %}

## Browsing Marketplace actions in the workflow editor

You can search and browse actions directly in your repository's workflow editor. From the sidebar, you can search for a specific action, view featured actions, and browse featured categories. You can also view the number of stars an action has received from the {% data variables.product.prodname_dotcom %} community.

1. In your repository, browse to the workflow file you want to edit.
1. In the upper right corner of the file view, to open the workflow editor, click {% octicon "pencil" aria-label="The edit icon" %}.
![Edit workflow file button](/assets/images/help/repository/actions-edit-workflow-file.png)
![Edit workflow file button](/assets/images/help/repository/actions-edit-workflow-file.png)
1. To the right of the editor, use the {% data variables.product.prodname_marketplace %} sidebar to browse actions. Actions with the {% octicon "verified" aria-label="The verified badge" %} badge indicate {% data variables.product.prodname_dotcom %} has verified the creator of the action as a partner organization.
![Marketplace workflow sidebar](/assets/images/help/repository/actions-marketplace-sidebar.png)
![Marketplace workflow sidebar](/assets/images/help/repository/actions-marketplace-sidebar.png)

## Adding an action to your workflow

An action's listing page includes the action's version and the workflow syntax required to use the action. To keep your workflow stable even when updates are made to an action, you can reference the version of the action to use by specifying the Git or Docker tag number in your workflow file.

1. Navigate to the action you want to use in your workflow.
1. Under "Installation", click {% octicon "clippy" aria-label="The edit icon" %} to copy the workflow syntax.
![View action listing](/assets/images/help/repository/actions-sidebar-detailed-view.png)
![View action listing](/assets/images/help/repository/actions-sidebar-detailed-view.png)
1. Paste the syntax as a new step in your workflow. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps)."
1. If the action requires you to provide inputs, set them in your workflow. For information on inputs an action might require, see "[Using inputs and outputs with an action](/actions/learn-github-actions/finding-and-customizing-actions#using-inputs-and-outputs-with-an-action)."

{% if currentVersion == "free-pro-team@latest" %}

{% data reusables.dependabot.version-updates-for-actions %}

{% endif %}
Expand All @@ -70,7 +70,7 @@ Tags are useful for letting you decide when to switch between major and minor ve

```yaml
steps:
- uses: actions/javascript-action@v1.0.1
- uses: actions/javascript-action@v1.0.1
```

### Using SHAs
Expand All @@ -79,7 +79,7 @@ If you need more reliable versioning, you should use the SHA value associated wi

```yaml
steps:
- uses: actions/javascript-action@172239021f7ba04fe7327647b213799853a9eb89
- uses: actions/javascript-action@172239021f7ba04fe7327647b213799853a9eb89
```

### Using branches
Expand All @@ -88,7 +88,7 @@ Specifying a target branch for the action means it will always run the version c

```yaml
steps:
- uses: actions/javascript-action@main
- uses: actions/javascript-action@main
```

For more information, see "[Using release management for actions](/actions/creating-actions/about-actions#using-release-management-for-actions)."
Expand All @@ -102,19 +102,20 @@ To see the inputs and outputs of an action, check the `action.yml` or `action.ya
In this example `action.yml`, the `inputs` keyword defines a required input called `file-path`, and includes a default value that will be used if none is specified. The `outputs` keyword defines an output called `results-file`, which tells you where to locate the results.

```yaml
name: 'Example'
description: 'Receives file and generates output'
name: "Example"
description: "Receives file and generates output"
inputs:
file-path: # id of input
file-path: # id of input
description: "Path to test script"
required: true
default: 'test-file.js'
default: "test-file.js"
outputs:
results-file: # id of output
description: "Path to results file"
```

{% if currentVersion == "github-ae@latest" %}

## Using the actions included with {% data variables.product.prodname_ghe_managed %}

By default, you can use most of the official {% data variables.product.prodname_dotcom %}-authored actions in {% data variables.product.prodname_ghe_managed %}. For more information, see "[Using actions in {% data variables.product.prodname_ghe_managed %}](/admin/github-actions/using-actions-in-github-ae)."
Expand Down
Loading