From c00af83676531f996e2729ed2a39cb0cdaf1c745 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 22 Oct 2026 20:05:39 +0000 Subject: [PATCH] Document the artifact retention limit (#602) Documents https://github.com/go-gitea/gitea/pull/39894 for main and 28. Workflows can request a shorter artifact retention, down to 1 day, and `github.retention_days` carries `ARTIFACT_RETENTION_DAYS`, empty when artifacts are kept forever. --------- Co-authored-by: bircni Reviewed-on: https://gitea.com/gitea/docs/pulls/602 Reviewed-by: bircni Co-authored-by: silverwind --- docs/administration/config-cheat-sheet.md | 2 +- docs/usage/actions/variables.md | 4 ++-- .../version-28/administration/config-cheat-sheet.md | 2 +- versioned_docs/version-28/usage/actions/variables.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/administration/config-cheat-sheet.md b/docs/administration/config-cheat-sheet.md index cfc6cadb..f08ac133 100644 --- a/docs/administration/config-cheat-sheet.md +++ b/docs/administration/config-cheat-sheet.md @@ -1707,7 +1707,7 @@ PROXY_HOSTS = *.github.com But it will save storage space and network bandwidth, so it's still recommended to use compression. - `ARTIFACT_RETENTION_DAYS`: **90**: Days to keep artifacts. Old artifacts will be deleted after this period. 0 means keep forever. Changes only apply to newly uploaded artifacts, existing ones keep the expiry stored when they were uploaded. - Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step. + Workflows can request a shorter retention period, down to 1 day. - `ARTIFACT_PREVIEW_MAX_SIZE`: **10485760**: Maximum total artifact size in bytes that can be browsed or previewed in the web UI. Set to `0` to disable artifact previews or `-1` for no limit. Individual files are also limited by [`MAX_DISPLAY_FILE_SIZE`](#ui-ui). - `RUN_RETENTION_DAYS`: **400**: Days to keep completed runs. Old runs and everything under them will be deleted after this period. 0 means keep forever. - `ZOMBIE_TASK_TIMEOUT`: **10m**: Timeout to stop the task which have running status, but haven't been updated for a long time diff --git a/docs/usage/actions/variables.md b/docs/usage/actions/variables.md index e38652ff..6ca4492e 100644 --- a/docs/usage/actions/variables.md +++ b/docs/usage/actions/variables.md @@ -39,7 +39,7 @@ These environment variables are set automatically in every workflow run and can | `GITHUB_REF_TYPE` | The type of ref: `branch` or `tag`. | `branch` | | `GITHUB_REPOSITORY` | The owner and repository name. | `gitea/docs` | | `GITHUB_REPOSITORY_OWNER` | The repository owner's username. | `gitea` | -| `GITHUB_RETENTION_DAYS` | The number of days that workflow run logs and artifacts are kept. | `90` | +| `GITHUB_RETENTION_DAYS` | The number of days that artifacts are kept, empty when kept forever. | `90` | | `GITHUB_RUN_ATTEMPT` | The attempt number of the workflow run. | `1` | | `GITHUB_RUN_ID` | A unique number for each workflow run. | `1234` | | `GITHUB_RUN_NUMBER` | A unique number for each run of a particular workflow. | `42` | @@ -98,7 +98,7 @@ These variables are available in workflow expressions via `${{ gitea. }}`. | `gitea.repository`
`github.repository` | The owner and repository name. | `gitea/docs` | | `gitea.repository_owner`
`github.repository_owner` | The repository owner's username. | `gitea` | | `gitea.repositoryUrl`
`github.repositoryUrl` | The HTML URL to the repository. | `https://gitea.com/gitea/docs` | -| `gitea.retention_days`
`github.retention_days` | The number of days that workflow run logs and artifacts are kept. | `90` | +| `gitea.retention_days`
`github.retention_days` | The number of days that artifacts are kept, empty when kept forever. | `90` | | `gitea.run_id`
`github.run_id` | A unique number for each workflow run within a repository. Does not change on re-run. | `1234` | | `gitea.run_number`
`github.run_number` | A unique number for each run of a particular workflow. Starts at 1 and increments with each new run. | `42` | | `gitea.run_attempt`
`github.run_attempt` | A unique number for each re-run attempt. Starts at 1 and increments with each re-run. | `1` | diff --git a/versioned_docs/version-28/administration/config-cheat-sheet.md b/versioned_docs/version-28/administration/config-cheat-sheet.md index 2ecadfb2..0e4b651f 100644 --- a/versioned_docs/version-28/administration/config-cheat-sheet.md +++ b/versioned_docs/version-28/administration/config-cheat-sheet.md @@ -1706,7 +1706,7 @@ PROXY_HOSTS = *.github.com But it will save storage space and network bandwidth, so it's still recommended to use compression. - `ARTIFACT_RETENTION_DAYS`: **90**: Days to keep artifacts. Old artifacts will be deleted after this period. 0 means keep forever. Changes only apply to newly uploaded artifacts, existing ones keep the expiry stored when they were uploaded. - Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step. + Workflows can request a shorter retention period, down to 1 day. - `ARTIFACT_PREVIEW_MAX_SIZE`: **10485760**: Maximum total artifact size in bytes that can be browsed or previewed in the web UI. Set to `0` to disable artifact previews or `-1` for no limit. Individual files are also limited by [`MAX_DISPLAY_FILE_SIZE`](#ui-ui). - `RUN_RETENTION_DAYS`: **400**: Days to keep completed runs. Old runs and everything under them will be deleted after this period. 0 means keep forever. - `ZOMBIE_TASK_TIMEOUT`: **10m**: Timeout to stop the task which have running status, but haven't been updated for a long time diff --git a/versioned_docs/version-28/usage/actions/variables.md b/versioned_docs/version-28/usage/actions/variables.md index ac157a64..f060aca5 100644 --- a/versioned_docs/version-28/usage/actions/variables.md +++ b/versioned_docs/version-28/usage/actions/variables.md @@ -39,7 +39,7 @@ These environment variables are set automatically in every workflow run and can | `GITHUB_REF_TYPE` | The type of ref: `branch` or `tag`. | `branch` | | `GITHUB_REPOSITORY` | The owner and repository name. | `gitea/docs` | | `GITHUB_REPOSITORY_OWNER` | The repository owner's username. | `gitea` | -| `GITHUB_RETENTION_DAYS` | The number of days that workflow run logs and artifacts are kept. | `90` | +| `GITHUB_RETENTION_DAYS` | The number of days that artifacts are kept, empty when kept forever. | `90` | | `GITHUB_RUN_ATTEMPT` | The attempt number of the workflow run. | `1` | | `GITHUB_RUN_ID` | A unique number for each workflow run. | `1234` | | `GITHUB_RUN_NUMBER` | A unique number for each run of a particular workflow. | `42` | @@ -98,7 +98,7 @@ These variables are available in workflow expressions via `${{ gitea. }}`. | `gitea.repository`
`github.repository` | The owner and repository name. | `gitea/docs` | | `gitea.repository_owner`
`github.repository_owner` | The repository owner's username. | `gitea` | | `gitea.repositoryUrl`
`github.repositoryUrl` | The HTML URL to the repository. | `https://gitea.com/gitea/docs` | -| `gitea.retention_days`
`github.retention_days` | The number of days that workflow run logs and artifacts are kept. | `90` | +| `gitea.retention_days`
`github.retention_days` | The number of days that artifacts are kept, empty when kept forever. | `90` | | `gitea.run_id`
`github.run_id` | A unique number for each workflow run within a repository. Does not change on re-run. | `1234` | | `gitea.run_number`
`github.run_number` | A unique number for each run of a particular workflow. Starts at 1 and increments with each new run. | `42` | | `gitea.run_attempt`
`github.run_attempt` | A unique number for each re-run attempt. Starts at 1 and increments with each re-run. | `1` |