Merge branch 'main' into all-contributors/add-casals

This commit is contained in:
Janice 2020-10-08 18:54:49 -07:00 коммит произвёл GitHub
Родитель d0ae579ff4 604ac9bfbe
Коммит 19369b125d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
20 изменённых файлов: 238 добавлений и 131 удалений

Просмотреть файл

@ -295,6 +295,15 @@
"doc"
]
},
{
"login": "jeffmcaffer",
"name": "Jeff McAffer",
"avatar_url": "https://avatars2.githubusercontent.com/u/10070956?v=4",
"profile": "https://mcaffer.com",
"contributions": [
"doc"
]
},
{
"login": "tjenkinson",
"name": "Tom Jenkinson",

Просмотреть файл

@ -32,7 +32,7 @@ Fork using the command line:
### Make your update:
Make your changes to the file(s) you'd like to update. Here are some tips and tricks for [using the docs codebase](#working-in-the-githubdocs-repository).
- Are you making changes to the application code? You'll need **Node.js v14** to run the site locally. See [contributing/development.md](contributing/development.md).
- Are you contributing to markdown? We use [GitHub Markdown](contributing/content-markup-reference).
- Are you contributing to markdown? We use [GitHub Markdown](contributing/content-markup-reference.md).
### Open a pull request
When you're done making changes and you'd like to propose them for review, use the [pull request template](#pull-request-template) to open your PR (pull request).
@ -63,8 +63,6 @@ Now that you're a part of the GitHub Docs community, you can keep participating
- [Starting with an issue](#starting-with-an-issue)
- [Labels](#labels)
- [Opening a pull request](#opening-a-pull-request)
- [Fork using GitHub Desktop](#fork-using-github-desktop)
- [Fork using the command line](#fork-using-the-command-line)
- [Working in the github/docs repository](#working-in-the-githubdocs-repository)
- [Resolving merge conflicts](#resolving-merge-conflicts)
- [In the GitHub user interface](#in-the-github-user-interface)
@ -156,7 +154,7 @@ You should always review your own PR first.
For content changes, make sure that you:
- [ ] Confirm that the changes address every part of the content strategy plan from your issue (if there are differences, explain them).
- [ ] Review the content for technical accuracy.
- [ ] Review the entire pull request using the [localization checklist](contribution/localization-checklist.md).
- [ ] Review the entire pull request using the [localization checklist](contributing/localization-checklist.md).
- [ ] Copy-edit the changes for grammar, spelling, and adherence to the style guide.
- [ ] Check new or updated Liquid statements to confirm that versioning is correct.
- [ ] Check that all of your changes render correctly in staging. Remember, that lists and tables can be tricky.

Просмотреть файл

@ -26,6 +26,10 @@ As you're using the GitHub Docs, you may find something in an article that you'd
If you've found a problem, you can open an issue using a [template](https://github.com/github/docs/issues/new/choose).
#### Solve an issue
If you have a solution to one of the open issues, you will need to fork the repository and submit a PR using the [template](https://github.com/github/docs/blob/main/CONTRIBUTING.md#pull-request-template) that is visible automatically in the pull request body. For more details about this process, please check out [Getting Started with Contributing](/CONTRIBUTING.md).
#### Join us in discussions
We use GitHub Discussions to talk about all sorts of topics related to documentation and this site. For example: if you'd like help troubleshooting a PR, have a great new idea, or want to share something amazing you've learned in our docs, join us in [discussions](https://github.com/github/docs/discussions).
@ -113,6 +117,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center"><a href="https://github.com/BenJam"><img src="https://avatars2.githubusercontent.com/u/158833?v=4" width="64px;" alt=""/><br /><sub><b>Benjamin Nickolls</b></sub></a><br /><a href="https://github.com/github/docs/commits?author=BenJam" title="Documentation">📖</a></td>
<td align="center"><a href="https://mcaffer.com"><img src="https://avatars2.githubusercontent.com/u/10070956?v=4" width="64px;" alt=""/><br /><sub><b>Jeff McAffer</b></sub></a><br /><a href="https://github.com/github/docs/commits?author=jeffmcaffer" title="Documentation">📖</a></td>
<td align="center"><a href="https://tjenkinson.me"><img src="https://avatars0.githubusercontent.com/u/3259993?v=4" width="64px;" alt=""/><br /><sub><b>Tom Jenkinson</b></sub></a><br /><a href="https://github.com/github/docs/commits?author=tjenkinson" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/casals"><img src="https://avatars0.githubusercontent.com/u/785860?v=4" width="64px;" alt=""/><br /><sub><b>Arthur Casals</b></sub></a><br /><a href="#content-casals" title="Content">🖋</a> <a href="https://github.com/github/docs/commits?author=casals" title="Documentation">📖</a></td>
</tr>

Просмотреть файл

@ -18,7 +18,9 @@ versions:
### About workflow artifacts
Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact is a file or collection of files produced during a workflow run. For example, you can use artifacts to save your build and test output after a workflow run has ended. For pushes and pull requests, {% data variables.product.product_name %} stores artifacts for 90 days. The retention period for a pull request restarts each time someone pushes a new commit to the pull request.
Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact is a file or collection of files produced during a workflow run. For example, you can use artifacts to save your build and test output after a workflow run has ended.
{% data reusables.github-actions.artifact-log-retention-statement %} The retention period for a pull request restarts each time someone pushes a new commit to the pull request.
These are some of the common artifacts that you can upload:
@ -48,6 +50,119 @@ To share data between jobs:
The steps of a job share the same environment on the runner machine, but run in their own individual processes. To pass data between steps in a job, you can use inputs and outputs. For more information about inputs and outputs, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions)."
### Uploading build and test artifacts
You can create a continuous integration (CI) workflow to build and test your code. For more information about using {% data variables.product.prodname_actions %} to perform CI, see "[About continuous integration](/articles/about-continuous-integration)."
The output of building and testing your code often produces files you can use to debug test failures and production code that you can deploy. You can configure a workflow to build and test the code pushed to your repository and report a success or failure status. You can upload the build and test output to use for deployments, debugging failed tests or crashes, and viewing test suite coverage.
You can use the `upload-artifact` action to upload artifacts. When uploading an artifact, you can specify a single file or directory, or multiple files or directories. You can also exclude certain files or directories, and use wildcard patterns. We recommend that you provide a name for an artifact, but if no name is provided then `artifact` will be used as the default name. For more information on syntax, see the {% if currentVersion == "free-pro-team@latest" %}[actions/upload-artifact](https://github.com/actions/upload-artifact) action{% else %} `actions/upload-artifact` action on {% data variables.product.product_location %}{% endif %}.
#### Example
For example, your repository or a web application might contain SASS and TypeScript files that you must convert to CSS and JavaScript. Assuming your build configuration outputs the compiled files in the `dist` directory, you would deploy the files in the `dist` directory to your web application server if all tests completed successfully.
```
|-- hello-world (repository)
| └── dist
| └── tests
| └── src
| └── sass/app.scss
| └── app.ts
| └── output
| └── test
|
```
This example shows you how to create a workflow for a Node.js project that `builds` the code in the `src` directory and runs the tests in the `tests` directory. You can assume that running `npm test` produces a code coverage report named `code-coverage.html` stored in the `output/test/` directory.
The workflow uploads the production artifacts in the `dist` directory, but excludes any markdown files. It also and uploads the `code-coverage.html` report as another artifact.
```yaml
name: Node CI
on: [push]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: dist-without-markdown
path: |
dist
!dist/**/*.md
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: output/test/code-coverage.html
```
![Image of workflow upload artifact workflow run](/assets/images/help/repository/upload-build-test-artifact.png)
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
### Configuring a custom artifact retention period
You can define a custom retention period for individual artifacts created by a workflow. When using a workflow to create a new artifact, you can use `retention-days` with the `upload-artifact` action. This example demonstrates how to set a custom retention period of 5 days for the artifact named `my-artifact`:
```
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: my-artifact
path: my_file.txt
retention-days: 5
```
The `retention-days` value cannot exceed the retention limit set by the repository, organization, or enterprise.
{% endif %}
### Downloading or deleting artifacts
During a workflow run, you can use the [`download-artifact`](https://github.com/actions/download-artifact)action to download artifacts that were previously uploaded in the same workflow run.
After a workflow run has been completed, you can download or delete artifacts on {% data variables.product.prodname_dotcom %} or using the REST API. For more information, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)," "[Removing workflow artifacts](/actions/managing-workflow-runs/removing-workflow-artifacts)," and the "[Artifacts REST API](/v3/actions/artifacts/)."
#### Downloading artifacts during a workflow run
The [`actions/download-artifact`](https://github.com/actions/download-artifact) action can be used to download previously uploaded artifacts during a workflow run.
{% note %}
**Note:** You can only download artifacts in a workflow that were uploaded during the same workflow run.
{% endnote %}
Specify an artifact's name to download an individual artifact. If you uploaded an artifact without specifying a name, the default name is `artifact`.
```yaml
- name: Download a single artifact
uses: actions/download-artifact@v2
with:
name: my-artifact
```
You can also download all artifacts in a workflow run by not specifying a name. This can be useful if you are working with lots of artifacts.
```yaml
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
```
If you download all a workflow run's artifacts, a directory for each artifact is created using its name.
For more information on syntax, see the {% if currentVersion == "free-pro-team@latest" %}[actions/download-artifact](https://github.com/actions/download-artifact) action{% else %} `actions/download-artifact` action on {% data variables.product.product_location %}{% endif %}.
### Passing data between jobs in a workflow
You can use the `upload-artifact` and `download-artifact` actions to share data between jobs in a workflow. This example workflow illustrates how to pass data between jobs in the same workflow. For more information, see the {% if currentVersion == "free-pro-team@latest" %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.product.product_location %}{% endif %}.
@ -125,125 +240,6 @@ jobs:
![Workflow that passes data between jobs to perform math](/assets/images/help/repository/passing-data-between-jobs-in-a-workflow.png)
### Sharing data between workflow runs
After a workflow ends, you can download a compressed file of the uploaded artifacts on {% data variables.product.product_name %} by finding the workflow run in the **Actions** tab. You can also use the {% data variables.product.prodname_dotcom %} REST API to download artifacts. For more information, see "[Artifacts](/v3/actions/artifacts/)."
If you need to access artifacts from a previous workflow run, you can use the {% data variables.product.product_name %} REST API to retrieve artifacts. For more information, see "[Get an artifact](/rest/reference/actions#artifacts)."
### Uploading build and test artifacts
You can create a continuous integration (CI) workflow to build and test your code. For more information about using {% data variables.product.prodname_actions %} to perform CI, see "[About continuous integration](/articles/about-continuous-integration)."
The output of building and testing your code often produces files you can use to debug test failures and production code that you can deploy. You can configure a workflow to build and test the code pushed to your repository and report a success or failure status. You can upload the build and test output to use for deployments, debugging failed tests or crashes, and viewing test suite coverage.
You can use the `upload-artifact` action to upload artifacts. When uploading an artifact, you can specify a single file or directory, or multiple files or directories. You can also exclude certain files or directories, and use wildcard patterns. We recommend that you provide a name for an artifact, but if no name is provided then `artifact` will be used as the default name. For more information on syntax, see the {% if currentVersion == "free-pro-team@latest" %}[actions/upload-artifact](https://github.com/actions/upload-artifact) action{% else %} `actions/upload-artifact` action on {% data variables.product.product_location %}{% endif %}.
#### Example
For example, your repository or a web application might contain SASS and TypeScript files that you must convert to CSS and JavaScript. Assuming your build configuration outputs the compiled files in the `dist` directory, you would deploy the files in the `dist` directory to your web application server if all tests completed successfully.
```
|-- hello-world (repository)
| └── dist
| └── tests
| └── src
| └── sass/app.scss
| └── app.ts
| └── output
| └── test
|
```
This example shows you how to create a workflow for a Node.js project that `builds` the code in the `src` directory and runs the tests in the `tests` directory. You can assume that running `npm test` produces a code coverage report named `code-coverage.html` stored in the `output/test/` directory.
The workflow uploads the production artifacts in the `dist` directory, but excludes any markdown files. It also and uploads the `code-coverage.html` report as another artifact.
```yaml
name: Node CI
on: [push]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: dist-without-markdown
path: |
dist
!dist/**/*.md
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: output/test/code-coverage.html
```
![Image of workflow upload artifact workflow run](/assets/images/help/repository/upload-build-test-artifact.png)
### Downloading or deleting artifacts
During a workflow run, you can download artifacts that were previously uploaded in the same workflow run. After a workflow run has been completed, you can download or delete artifacts on GitHub using the workflow run history.
#### Downloading artifacts during a workflow run
The [actions/download-artifact](https://github.com/actions/download-artifact) action can be used to download previously uploaded artifacts during a workflow run.
{% note %}
**Note:** You can only download artifacts in a workflow that were uploaded during the same workflow run.
{% endnote %}
Specify an artifact's name to download an individual artifact. If you uploaded an artifact without specifying a name, the default name is `artifact`.
```yaml
- name: Download a single artifact
uses: actions/download-artifact@v2
with:
name: my-artifact
```
You can also download all artifacts in a workflow run by not specifying a name. This can be useful if you are working with lots of artifacts.
```yaml
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
```
If you download all a workflow run's artifacts, a directory for each artifact is created using its name.
For more information on syntax, see the {% if currentVersion == "free-pro-team@latest" %}[actions/download-artifact](https://github.com/actions/download-artifact) action{% else %} `actions/download-artifact` action on {% data variables.product.product_location %}{% endif %}.
#### Downloading and deleting artifacts after a workflow run is complete
Artifacts automatically expire after 90 days, but you can always reclaim used {% data variables.product.prodname_actions %} storage by deleting artifacts before they expire on {% data variables.product.product_name %}.
{% warning %}
**Warning:** Once you delete an artifact, it can not be restored.
{% endwarning %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
1. To download artifacts, use the **Artifacts** drop-down menu, and select the artifact you want to download.
![Download artifact drop-down menu](/assets/images/help/repository/artifact-drop-down.png)
1. To delete artifacts, use the **Artifacts** drop-down menu, and click {% octicon "trashcan" aria-label="The trashcan icon" %}.
![Delete artifact drop-down menu](/assets/images/help/repository/actions-delete-artifact.png)
{% if currentVersion == "free-pro-team@latest" %}
### Further reading

Просмотреть файл

@ -1,6 +1,6 @@
---
title: Downloading workflow artifacts
intro: You can download artifacts that were archived during a workflow run. Artifacts automatically expire after 90 days.
intro: You can download archived artifacts before they automatically expire.
product: '{% data reusables.gated-features.actions %}'
versions:
free-pro-team: '*'
@ -10,6 +10,9 @@ versions:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} By default, {% data variables.product.product_name %} stores build logs and artifacts for 90 days, and you can customize this retention period, depending on the type of repository. For more information, see "[Configuring the retention period for GitHub Actions artifacts and logs in your repository](/github/administering-a-repository/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository)."{% endif %}
{% if currentVersion == "enterprise-server@2.22" %} {% data variables.product.product_name %} stores full build logs and artifacts for 90 days.{% endif %}
{% data reusables.repositories.permissions-statement-read %}
{% data reusables.repositories.navigate-to-repo %}

Просмотреть файл

@ -1,6 +1,6 @@
---
title: Removing workflow artifacts
intro: 'Artifacts automatically expire after 90 days, but you can always reclaim used {% data variables.product.prodname_actions %} storage by deleting artifacts before they expire on {% data variables.product.product_name %}.'
intro: 'You can reclaim used {% data variables.product.prodname_actions %} storage by deleting artifacts before they expire on {% data variables.product.product_name %}.'
product: '{% data reusables.gated-features.actions %}'
versions:
free-pro-team: '*'
@ -10,6 +10,8 @@ versions:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
### Deleting an artifact
{% warning %}
**Warning:** Once you delete an artifact, it can not be restored.
@ -18,9 +20,23 @@ versions:
{% data reusables.repositories.permissions-statement-write %}
{% data reusables.github-actions.artifact-log-retention-statement %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
1. Under **Artifacts**, click {% octicon "trashcan" aria-label="The trashcan icon" %} next to the artifact you want to remove.
![Delete artifact drop-down menu](/assets/images/help/repository/actions-delete-artifact.png)
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
### Setting the retention period for an artifact
Retention periods for artifacts and logs can be configured at the repository, organization, and enterprise level. For more information, see "[Usage limits, billing, and administration](/actions/reference/usage-limits-billing-and-administration#artifact-and-log-retention-policy)."
You can also define a custom retention period for individual artifacts using the `actions/upload-artifact` action in a workflow. For more information, see "[Storing workflow data as artifacts](/actions/guides/storing-workflow-data-as-artifacts#configuring-a-custom-artifact-retention-period)."
### Finding the expiration date of an artifact
You can use the API to confirm the date that an artifact is scheduled to be deleted. For more information, see the `expires_at` value returned by "[List artifacts for a repository](/rest/reference/actions#artifacts)."
{% endif %}

Просмотреть файл

@ -1,6 +1,6 @@
---
title: Using workflow run logs
intro: 'You can view, search, and download the logs for each job in a workflow run. {% data variables.product.product_name %} stores full build logs and artifacts for 90 days.'
intro: 'You can view, search, and download the logs for each job in a workflow run.'
product: '{% data reusables.gated-features.actions %}'
versions:
free-pro-team: '*'

Просмотреть файл

@ -53,6 +53,20 @@ Usage limits apply to self-hosted runners. For more information, see "[About sel
In addition to the usage limits, you must ensure that you use {% data variables.product.prodname_actions %} within the [GitHub Terms of Service](/articles/github-terms-of-service/). For more information on {% data variables.product.prodname_actions %}-specific terms, see the [GitHub Additional Product Terms](/github/site-policy/github-additional-product-terms#a-actions-usage).
{% endif %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
### Artifact and log retention policy
You can configure the artifact and log retention period for your repository, organization, or enterprise account.
{% data reusables.actions.about-artifact-log-retention %}
For more information, see:
- [Configuring the retention period for {% data variables.product.prodname_actions %} for artifacts and logs in your repository](/github/administering-a-repository/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository)
- [Configuring the retention period for {% data variables.product.prodname_actions %} for artifacts and logs in your organization](/github/setting-up-and-managing-organizations-and-teams/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization)
- [Configuring the retention period for {% data variables.product.prodname_actions %} for artifacts and logs in your enterprise](/github/setting-up-and-managing-your-enterprise-account/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-enterprise-account)
{% endif %}
### Disabling or limiting {% data variables.product.prodname_actions %} for your repository or organization
{% data reusables.github-actions.disabling-github-actions %}

Просмотреть файл

@ -234,7 +234,7 @@ During the execution of a workflow, the runner generates temporary files that ca
```
steps:
- run: echo "mypath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
- run: echo "mypath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
```
{% endwarning %}

Просмотреть файл

@ -69,7 +69,7 @@ You can populate the runner tool cache by running a {% data variables.product.pr
path: ${{runner.tool_cache}}/tool_cache.tar.gz
```
{% endraw %}
1. Download the tool cache artifact from the workflow run. For instructions on downloading artifacts, see "[Persisting workflow data using artifacts](/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts#downloading-and-deleting-artifacts-after-a-workflow-run-is-complete)."
1. Download the tool cache artifact from the workflow run. For instructions on downloading artifacts, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)."
1. Transfer the tool cache artifact to your self hosted runner and extract it to the local tool cache directory. The default tool cache directory is `RUNNER_DIR/_work/_tool`. If the runner hasn't processed any jobs yet, you might need to create the `_work/_tool` directories.
After extracting the tool cache artifact uploaded in the above example, you should have a directory structure on your self-hosted runner that is similar to the following example:

Просмотреть файл

@ -0,0 +1,18 @@
---
title: Configuring the retention period for GitHub Actions artifacts and logs in your repository
intro: 'You can configure the retention period for {% data variables.product.prodname_actions %} artifacts and logs in your repository.'
versions:
free-pro-team: '*'
enterprise-server: '>=2.23'
---
{% data reusables.actions.about-artifact-log-retention %}
You can also define a custom retention period for a specific artifact created by a workflow. For more information, see "[Setting the retention period for an artifact](/actions/managing-workflow-runs/removing-workflow-artifacts#setting-the-retention-period-for-an-artifact)."
## Setting the retention period for a repository
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.settings-sidebar-actions %}
{% data reusables.github-actions.change-retention-period-for-artifacts-logs %}

Просмотреть файл

@ -27,6 +27,7 @@ versions:
<!-- endif -->
{% link_in_list /managing-the-forking-policy-for-your-repository %}
<!-- if currentVersion != "free-pro-team@latest" -->
{% link_in_list /configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository %}
{% link_in_list /disabling-or-limiting-github-actions-for-a-repository %}
{% link_in_list /managing-git-lfs-objects-in-archives-of-your-repository %}
{% link_in_list /enabling-anonymous-git-read-access-for-a-repository %}

Просмотреть файл

@ -0,0 +1,16 @@
---
title: Configuring the retention period for GitHub Actions artifacts and logs in your organization
intro: 'You can configure the retention period for {% data variables.product.prodname_actions %} artifacts and logs in your organization.'
versions:
free-pro-team: '*'
enterprise-server: '>=2.23'
---
{% data reusables.actions.about-artifact-log-retention %}
## Setting the retention period for an organization
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.organizations.settings-sidebar-actions %}
{% data reusables.github-actions.change-retention-period-for-artifacts-logs %}

Просмотреть файл

@ -100,6 +100,7 @@ versions:
{% link_in_list /managing-the-forking-policy-for-your-organization %}
<!-- if currentVersion == "free-pro-team@latest" -->
{% link_in_list /disabling-or-limiting-github-actions-for-your-organization %}
{% link_in_list /configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization %}
<!-- endif -->
<!-- if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.15" -->
{% link_in_list /setting-permissions-for-adding-outside-collaborators %}

Просмотреть файл

@ -0,0 +1,19 @@
---
title: Configuring the retention period for GitHub Actions artifacts and logs in your enterprise account
intro: 'Enterprise owners can configure the retention period for {% data variables.product.prodname_actions %} artifacts and logs in an enterprise account.'
product: '{% data reusables.gated-features.enterprise-accounts %}'
miniTocMaxHeadingLevel: 4
versions:
free-pro-team: '*'
enterprise-server: '>=2.23'
---
{% data reusables.actions.about-artifact-log-retention %}
## Setting the retention period for an enterprise
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.business %}
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.actions-tab %}
{% data reusables.github-actions.change-retention-period-for-artifacts-logs %}

Просмотреть файл

@ -33,3 +33,4 @@ versions:
{% link_in_list /configuring-saml-single-sign-on-and-scim-for-your-enterprise-account-using-okta %}
{% link_in_list /enforcing-a-policy-on-dependency-insights-in-your-enterprise-account %}
{% link_in_list /enforcing-github-actions-policies-in-your-enterprise-account %}
{% link_in_list /configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-enterprise-account %}

Просмотреть файл

@ -173,7 +173,7 @@ You can install a package by adding the package as a dependency to your project.
{% data reusables.package_registry.authenticate-step %}
2. Add the package dependencies to your *build.gradle* file (Gradle Groovy) or *build.gradle.kts* file (Kotlin DSL) file.
Example using Grady Groovy:
Example using Gradle Groovy:
```shell
dependencies {
implementation 'com.example:package'
@ -188,7 +188,7 @@ You can install a package by adding the package as a dependency to your project.
3. Add the maven plugin to your *build.gradle* file (Gradle Groovy) or *build.gradle.kts* file (Kotlin DSL) file.
Example using Grady Groovy:
Example using Gradle Groovy:
```shell
plugins {
id 'maven'

Просмотреть файл

@ -0,0 +1,6 @@
By default, the artifacts and log files generated by workflows are retained for 90 days before they are automatically deleted. You can adjust the retention period, depending on the type of repository:
- For public repositories: you can change this retention period to anywhere between 1 day or 90 days.
- For private, internal, and {% data variables.product.prodname_enterprise %} repositories: you can change this retention period to anywhere between 1 day or 400 days.
When you customize the retention period, it only applies to new artifacts and log files, and does not retroactively apply to existing objects. For managed repositories and organizations, the maximum retention period cannot exceed the limit set by the managing organization or enterprise.

Просмотреть файл

@ -0,0 +1,2 @@
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} By default, {% data variables.product.product_name %} stores build logs and artifacts for 90 days, and this retention period can be customized. For more information, see "[Usage limits, billing, and administration](/actions/reference/usage-limits-billing-and-administration#artifact-and-log-retention-policy)".{% endif %}
{% if currentVersion == "enterprise-server@2.22" %} {% data variables.product.product_name %} stores full build logs and artifacts for 90 days.{% endif %}

Просмотреть файл

@ -0,0 +1,2 @@
1. Under **Artifact and log retention duration**, enter a new value.
1. Click **Save** to apply the change.