From 930a18227b7f8e7d390f3155b2c2b0834eda44a7 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Tue, 2 Jan 2024 20:59:12 -0600 Subject: [PATCH] Documentation consistency fixes (#84) * Consistent use of periods * Consistent casing of GitHub * Use 2-space indentation for YAML example * Add links to for further details --- README.md | 16 ++++++++-------- action.yml | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e17914b..0efe541 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ However note that caching the registries may mean that the registry will not be - `cache-compiled` - Whether to cache `~/.julia/compiled/`. Defaults to `true`. - `cache-scratchspaces` - Whether to cache `~/.julia/scratchspaces/`. Defaults to `true`. - `cache-logs` - Whether to cache `~/.julia/logs/`. Defaults to `true`. Helps auto-`Pkg.gc()` keep the cache small. -- `delete-old-caches` - Whether to delete old caches for the given key. Defaults to `true` -- `token` - A github PAT. Defaults to `github.token`. Requires `repo` scope to enable the deletion of old caches. +- `delete-old-caches` - Whether to delete old caches for the given key. Defaults to `true`. +- `token` - A [GitHub PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). Defaults to `github.token`. Requires `repo` scope to enable the deletion of old caches. ### Outputs @@ -82,16 +82,16 @@ This action automatically deletes old caches that match the first 4 fields of th - All variables in the `matrix` (unless disabled via `include-matrix: 'false'`) - The `runner.os` (may be in the matrix too, but included for safety) -Which means your caches files will not grow needlessly. Github also deletes cache files after +Which means your caches files will not grow needlessly. GitHub also deletes cache files after [90 days which can be increased in private repos to up to 400 days](https://docs.github.com/en/organizations/managing-organization-settings/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization) > [!NOTE] -> To allow deletion of caches you will likely need to grant the following to the default -> `GITHUB_TOKEN` by adding this to your yml: -> ``` +> To allow deletion of caches you will likely need to [grant the following permissions](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) +> to the `GITHUB_TOKEN` by adding this to your GitHub actions workflow: +> ```yaml > permissions: -> actions: write -> contents: read +> actions: write +> contents: read > ``` > (Note this won't work for fork PRs but should once merged) > Or provide a token with `repo` scope via the `token` input option. diff --git a/action.yml b/action.yml index 61259fb..104a086 100644 --- a/action.yml +++ b/action.yml @@ -11,31 +11,31 @@ inputs: description: 'The cache key prefix. Unless disabled the key body automatically includes matrix vars, and the OS. Include any other parameters/details in this prefix to ensure one unique cache key per concurrent job type.' default: 'julia-cache-${{ github.workflow }}-${{ github.job }}' include-matrix: - description: 'Whether to include the matrix values when constructing the cache key' + description: 'Whether to include the matrix values when constructing the cache key.' default: 'true' cache-artifacts: - description: 'Whether to cache ~/.julia/artifacts/' + description: 'Whether to cache ~/.julia/artifacts/.' default: 'true' cache-packages: - description: 'Whether to cache ~/.julia/packages/' + description: 'Whether to cache ~/.julia/packages/.' default: 'true' cache-registries: - description: 'Whether to cache ~/.julia/registries/. This is off by default to ensure CI gets latest versions' + description: 'Whether to cache ~/.julia/registries/. This is off by default to ensure CI gets latest versions.' default: 'false' cache-compiled: - description: 'Whether to cache ~/.julia/compiled/' + description: 'Whether to cache ~/.julia/compiled/.' default: 'true' cache-scratchspaces: - description: 'Whether to cache ~/.julia/scratchspaces/' + description: 'Whether to cache ~/.julia/scratchspaces/.' default: 'true' cache-logs: - description: 'Whether to cache ~/.julia/logs/. This helps automatic Pkg.gc() keep the cache size down' + description: 'Whether to cache ~/.julia/logs/. This helps automatic Pkg.gc() keep the cache size down.' default: 'true' delete-old-caches: - description: 'Whether to delete old caches for the given key' + description: 'Whether to delete old caches for the given key.' default: 'true' token: - description: 'A github PAT. Requires `repo` scope to enable the deletion of old caches' + description: 'A GitHub PAT. Requires `repo` scope to enable the deletion of old caches.' default: '${{ github.token }}' outputs: