Skip to content

Commit

Permalink
Add information that PAT is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
d22 committed Nov 17, 2021
1 parent 10dbf66 commit c793232
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
This action deletes old versions of containers on Github container registry (ghcr.io).
By default only the latest version.

This action works only with containers, no other package formats.
This action works only for containers, no other package format.

Since the [Github Token has no access to the container REST API](https://github.community/t/github-token-has-no-access-to-new-container-rest-apis/170395), a [PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with packages read- and write-permission is needed to access the packages.
## Inputs
### `access-token`
**Required** Access token with packages read- and write-permisson.
**Required** Access token (PAT) with packages read- and write-permisson.
### `package-name`
**Required** Name of the package to work with
required: true
### `versions-to-keep`
How many versions should be left untouched. Default is '1', only the latest.
## Example usage
### Keep only the latest version:

uses: d22/cleanup-ghcr-containers-action@v0.3.0
uses: d22/cleanup-ghcr-containers-action@v0.3.3
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
package-name: 'master-tool-dev'

### Keep the latest and the two following versions:

uses: d22/cleanup-ghcr-containers-action@v0.3.0
uses: d22/cleanup-ghcr-containers-action@v0.3.3
with:
access-token: ${{ secrets.MY_PAT }}
access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
package-name: 'master-tool-dev'
versions-to-keep: 3

0 comments on commit c793232

Please sign in to comment.