Closed hassanshaikley closed 1 year ago
I needed the extra auth step
@hassanshaikley Can you provide clarity on what you mean by "the extra auth step"?
I have configured GitHub Actions as follows and I also encounter the same error message:
failed to list tags for repo gcr.io/webapp-alpha/curl: GET https://gcr.io/v2/project-alpha/curl/tags/list?n=1000: DENIED: Failed to read tags for host 'gcr.io', repository '/v2/project-alpha/curl/tags/list?n=1000'
Here's my action code:
name: 'gcr-cleaner'
on:
schedule:
- cron: '0 0 */1 * *'
push:
workflow_dispatch:
jobs:
gcr-cleaner:
runs-on: ubuntu-latest
steps:
- name: Login to gcr.io
uses: docker/login-action@v2
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCR_CLEANER_SERVICE_ACCOUNT }}
- name: Purge untagged images
uses: 'docker://us-docker.pkg.dev/gcr-cleaner/gcr-cleaner/gcr-cleaner-cli'
env:
GCRCLEANER_LOG: debug
with:
args: >-
-repo=gcr.io/project-alpha/curl
-grace=168h
-keep=10
-dry-run
ENIED: Failed to read tags for host 'gcr.io', repository
I've tried
-repo=gcr.io/place/my-image-name:latest
and that didn't workWhy is this happening? Any help is appreciated.