Merge branch 'main' into all-contributors/add-jeffmcaffer
This commit is contained in:
@@ -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).
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||

|
||||
|
||||
{% 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:
|
||||
|
||||

|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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.
|
||||

|
||||
1. To delete artifacts, use the **Artifacts** drop-down menu, and click {% octicon "trashcan" aria-label="The trashcan icon" %}.
|
||||

|
||||
|
||||
{% 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.
|
||||

|
||||
|
||||
{% 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 %}
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -13,13 +13,9 @@ versions:
|
||||
|
||||
You can change the most recent commit message using the `git commit --amend` command.
|
||||
|
||||
{% warning %}
|
||||
|
||||
In Git, the text of the commit message is part of the commit. Changing the commit message will change the commit ID--i.e., the SHA1 checksum that names the commit. Effectively, you are creating a new commit that replaces the old one.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
#### Commit has not been pushed online
|
||||
### Commit has not been pushed online
|
||||
|
||||
If the commit only exists in your local repository and has not been pushed to {% data variables.product.product_location %}, you can amend the commit message with the `git commit --amend` command.
|
||||
|
||||
@@ -39,7 +35,7 @@ You can change the default text editor for Git by changing the `core.editor` set
|
||||
|
||||
{% endtip %}
|
||||
|
||||
#### Amending older or multiple commit messages
|
||||
### Amending older or multiple commit messages
|
||||
|
||||
If you have already pushed the commit to {% data variables.product.product_location %}, you will have to force push a commit with an amended message.
|
||||
|
||||
@@ -49,7 +45,7 @@ We strongly discourage force pushing, since this changes the history of your rep
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
**Amending the message of the most recently pushed commit**
|
||||
**Changing the message of the most recently pushed commit**
|
||||
|
||||
1. Follow the [steps above](/articles/changing-a-commit-message#commit-has-not-been-pushed-online) to amend the commit message.
|
||||
2. Use the `push --force` command to force push over the old commit.
|
||||
@@ -57,7 +53,7 @@ We strongly discourage force pushing, since this changes the history of your rep
|
||||
$ git push --force <em>example-branch</em>
|
||||
```
|
||||
|
||||
**Amending the message of older or multiple commit messages**
|
||||
**Changing the message of older or multiple commit messages**
|
||||
|
||||
If you need to amend the message for multiple commits or an older commit, you can use interactive rebase, then force push to change the commit history.
|
||||
|
||||
@@ -93,7 +89,6 @@ If you need to amend the message for multiple commits or an older commit, you ca
|
||||
#
|
||||
# Note that empty commits are commented out
|
||||
```
|
||||
|
||||
3. Replace `pick` with `reword` before each commit message you want to change.
|
||||
```shell
|
||||
pick e499d89 Delete CNAME
|
||||
@@ -102,10 +97,10 @@ If you need to amend the message for multiple commits or an older commit, you ca
|
||||
```
|
||||
4. Save and close the commit list file.
|
||||
5. In each resulting commit file, type the new commit message, save the file, and close it.
|
||||
6. Force-push the amended commits.
|
||||
```shell
|
||||
$ git push --force
|
||||
```
|
||||
6. When you're ready to push your changes to GitHub, use the push --force command to force push over the old commit.
|
||||
```shell
|
||||
$ git push --force <em>example-branch</em>
|
||||
```
|
||||
|
||||
For more information on interactive rebase, see "[Interactive mode](https://git-scm.com/docs/git-rebase#_interactive_mode)" in the Git manual.
|
||||
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
6
data/reusables/actions/about-artifact-log-retention.md
Normal file
6
data/reusables/actions/about-artifact-log-retention.md
Normal file
@@ -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.
|
||||
Reference in New Issue
Block a user