action.yml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. name: 'Checkout'
  2. description: 'Checkout a Git repository at a particular version'
  3. inputs:
  4. repository:
  5. description: 'Repository name with owner. For example, actions/checkout'
  6. default: ${{ github.repository }}
  7. ref:
  8. description: >
  9. The branch, tag or SHA to checkout. When checking out the repository that
  10. triggered a workflow, this defaults to the reference or SHA for that
  11. event. Otherwise, uses the default branch.
  12. token:
  13. description: >
  14. Personal access token (PAT) used to fetch the repository. The PAT is configured
  15. with the local git config, which enables your scripts to run authenticated git
  16. commands. The post-job step removes the PAT.
  17. We recommend using a service account with the least permissions necessary.
  18. Also when generating a new PAT, select the least scopes necessary.
  19. [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)
  20. default: ${{ github.token }}
  21. ssh-key:
  22. description: >
  23. SSH key used to fetch the repository. The SSH key is configured with the local
  24. git config, which enables your scripts to run authenticated git commands.
  25. The post-job step removes the SSH key.
  26. We recommend using a service account with the least permissions necessary.
  27. [Learn more about creating and using
  28. encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
  29. ssh-known-hosts:
  30. description: >
  31. Known hosts in addition to the user and global host key database. The public
  32. SSH keys for a host may be obtained using the utility `ssh-keyscan`. For example,
  33. `ssh-keyscan github.com`. The public key for github.com is always implicitly added.
  34. ssh-strict:
  35. description: >
  36. Whether to perform strict host key checking. When true, adds the options `StrictHostKeyChecking=yes`
  37. and `CheckHostIP=no` to the SSH command line. Use the input `ssh-known-hosts` to
  38. configure additional hosts.
  39. default: true
  40. persist-credentials:
  41. description: 'Whether to configure the token or SSH key with the local git config'
  42. default: true
  43. path:
  44. description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
  45. clean:
  46. description: 'Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching'
  47. default: true
  48. fetch-depth:
  49. description: 'Number of commits to fetch. 0 indicates all history for all branches and tags.'
  50. default: 1
  51. lfs:
  52. description: 'Whether to download Git-LFS files'
  53. default: false
  54. submodules:
  55. description: >
  56. Whether to checkout submodules: `true` to checkout submodules or `recursive` to
  57. recursively checkout submodules.
  58. When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are
  59. converted to HTTPS.
  60. default: false
  61. set-safe-directory:
  62. description: Add repository path as safe.directory for Git global config by running `git config --global --add safe.directory <path>`
  63. default: true
  64. runs:
  65. using: node12
  66. main: dist/index.js
  67. post: dist/index.js