1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2024-12-24 11:35:51 +00:00

Add link to doc for creating and using encyrpted secrets (#123)

This commit is contained in:
eric sciple 2020-01-03 12:32:17 -05:00 committed by GitHub
parent dfd70d4a2d
commit bc50a995b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View file

@ -47,7 +47,8 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
# Auth token used to fetch the repository. The token is stored in the local git # Auth token used to fetch the repository. The token is stored in the local git
# config, which enables your scripts to run authenticated git commands. The # config, which enables your scripts to run authenticated git commands. The
# post-job step removes the token from the git config. # post-job step removes the token from the git config. [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)
# Default: ${{ github.token }} # Default: ${{ github.token }}
token: '' token: ''

View file

@ -13,7 +13,8 @@ inputs:
description: > description: >
Auth token used to fetch the repository. The token is stored in the local Auth token used to fetch the repository. The token is stored in the local
git config, which enables your scripts to run authenticated git commands. git config, which enables your scripts to run authenticated git commands.
The post-job step removes the token from the git config. The post-job step removes the token from the git config. [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)
default: ${{ github.token }} default: ${{ github.token }}
persist-credentials: persist-credentials:
description: 'Whether to persist the token in the git config' description: 'Whether to persist the token in the git config'

View file

@ -65,9 +65,14 @@ function updateUsage(
let segment: string = description let segment: string = description
if (description.length > width) { if (description.length > width) {
segment = description.substr(0, width + 1) segment = description.substr(0, width + 1)
while (!segment.endsWith(' ')) { while (!segment.endsWith(' ') && segment) {
segment = segment.substr(0, segment.length - 1) segment = segment.substr(0, segment.length - 1)
} }
// Trimmed too much?
if (segment.length < width * 0.67) {
segment = description
}
} else { } else {
segment = description segment = description
} }