Skip to content

Commit b66c270

Browse files
Documentation update - add recommended permissions to Readme (actions#2043)
* Update README.md * Update README.md Co-authored-by: Josh Gross <joshmgross@github.com> --------- Co-authored-by: Josh Gross <joshmgross@github.com>
2 parents d82e1af + 3204e0b commit b66c270

File tree

1 file changed

+118
-0
lines changed

1 file changed

+118
-0
lines changed

action.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,124 @@
11
name: 'Checkout'
22
description: 'Checkout a Git repository at a particular version'
33
inputs:
4+
=======
5+
description: 'Checkout a Git repository'
6+
inputs:
7+
>>>>>>> origin/Update-description
8+
repository:
9+
description: 'Repository name with owner. For example, actions/checkout'
10+
default: ${{ github.repository }}
11+
ref:
12+
description: >
13+
The branch, tag or SHA to checkout. When checking out the repository that
14+
triggered a workflow, this defaults to the reference or SHA for that
15+
event. Otherwise, uses the default branch.
16+
token:
17+
description: >
18+
Personal access token (PAT) used to fetch the repository. The PAT is configured
19+
with the local git config, which enables your scripts to run authenticated git
20+
commands. The post-job step removes the PAT.
21+
22+
23+
We recommend using a service account with the least permissions necessary.
24+
Also when generating a new PAT, select the least scopes necessary.
25+
26+
27+
[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
28+
default: ${{ github.token }}
29+
ssh-key:
30+
description: >
31+
SSH key used to fetch the repository. The SSH key is configured with the local
32+
git config, which enables your scripts to run authenticated git commands.
33+
The post-job step removes the SSH key.
34+
35+
36+
We recommend using a service account with the least permissions necessary.
37+
38+
39+
[Learn more about creating and using
40+
encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
41+
ssh-known-hosts:
42+
description: >
43+
Known hosts in addition to the user and global host key database. The public
44+
SSH keys for a host may be obtained using the utility `ssh-keyscan`. For example,
45+
`ssh-keyscan github.com`. The public key for github.com is always implicitly added.
46+
ssh-strict:
47+
description: >
48+
Whether to perform strict host key checking. When true, adds the options `StrictHostKeyChecking=yes`
49+
and `CheckHostIP=no` to the SSH command line. Use the input `ssh-known-hosts` to
50+
configure additional hosts.
51+
default: true
52+
ssh-user:
53+
description: >
54+
The user to use when connecting to the remote SSH host. By default 'git' is used.
55+
default: git
56+
persist-credentials:
57+
description: 'Whether to configure the token or SSH key with the local git config'
58+
default: true
59+
path:
60+
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
61+
clean:
62+
description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
63+
default: true
64+
filter:
65+
description: >
66+
Partially clone against a given filter.
67+
Overrides sparse-checkout if set.
68+
default: null
69+
sparse-checkout:
70+
description: >
71+
Do a sparse checkout on given patterns.
72+
Each pattern should be separated with new lines.
73+
default: null
74+
sparse-checkout-cone-mode:
75+
description: >
76+
Specifies whether to use cone-mode when doing a sparse checkout.
77+
default: true
78+
fetch-depth:
79+
description: 'Number of commits to fetch. 0 indicates all history for all branches and tags.'
80+
default: 1
81+
fetch-tags:
82+
description: 'Whether to fetch tags, even if fetch-depth > 0.'
83+
default: false
84+
show-progress:
85+
description: 'Whether to show progress status output when fetching.'
86+
default: true
87+
lfs:
88+
description: 'Whether to download Git-LFS files'
89+
default: false
90+
submodules:
91+
description: >
92+
Whether to checkout submodules: `true` to checkout submodules or `recursive` to
93+
recursively checkout submodules.
94+
95+
96+
When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are
97+
converted to HTTPS.
98+
default: false
99+
set-safe-directory:
100+
description: Add repository path as safe.directory for Git global config by running `git config --global --add safe.directory <path>`
101+
default: true
102+
github-server-url:
103+
description: The base URL for the GitHub instance that you are trying to clone from, will use environment defaults to fetch from the same instance that the workflow is running from unless specified. Example URLs are https://github.com or https://my-ghes-server.example.com
104+
required: false
105+
outputs:
106+
ref:
107+
description: 'The branch, tag or SHA that was checked out'
108+
commit:
109+
description: 'The commit SHA that was checked out'
110+
runs:
111+
using: node20
112+
main: dist/index.js
113+
post: dist/index.js
114+
name: 'Checkout'
115+
<<<<<<< master
116+
description: 'Checkout a Git repository at a particular version'
117+
inputs:
118+
=======
119+
description: 'Checkout a Git repository'
120+
inputs:
121+
>>>>>>> origin/Update-description
4122
repository:
5123
description: 'Repository name with owner. For example, actions/checkout'
6124
default: ${{ github.repository }}

0 commit comments

Comments
 (0)