Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for private Repositories #50

Open
Myzumi opened this issue May 4, 2022 · 3 comments
Open

Add Support for private Repositories #50

Myzumi opened this issue May 4, 2022 · 3 comments

Comments

@Myzumi
Copy link

Myzumi commented May 4, 2022

Hi there,

Im trying to use this action in a private repository to keep only the 5 latest artifacts, sadly this does not work on private repositories asn seen below

image

Would love to see support for private repos

@StephenHodgson
Copy link

StephenHodgson commented Dec 18, 2022

I'm using this on a private repo atm, so this error might be due to something else entirely

@shohei1029
Copy link

shohei1029 commented Apr 5, 2023

You may need to give the write permission to the workflow.
Settings > Actions > General > Workflow permissions
image

@alpipego
Copy link

This can also be done in the job definition via permission: write-all:

...
jobs:
  remove-old-artifacts:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    permissions: write-all

    steps:
      - name: Remove old artifacts
        uses: c-hive/gha-remove-artifacts@v1
        with:
          age: '1 week' # '<number> <unit>', e.g. 5 days, 2 years, 90 seconds, parsed by Moment.js
          skip-tags: true
          skip-recent: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants