getsentry / unity-docker

Docker container for Unity CI
2 stars 2 forks source link

CI: unused images #3

Closed vaind closed 1 year ago

vaind commented 2 years ago

Closes #1

The current version requires manually deleting the old images (which I cannot do BTW). We'd need a token with enough credentials to do it automatically in CI. I've tried it like this and couldn't even use the rest API to list the existing versions, despite them being publicly available:

  $auth = @{Authorization = "Token ${$env:GITHUB_TOKEN}"; Accept = 'application/vnd.github.machine-man-preview+json'}
  Invoke-WebRequest -Headers $headers https://api.github.com/orgs/getsentry/packages/container/unity-docker
shell: /usr/bin/pwsh -command ". '{0}'"
Invoke-WebRequest: /home/runner/work/_temp/64b046cc-[3](https://github.com/getsentry/unity-docker/runs/5972377069?check_suite_focus=true#step:3:3)a11-[4](https://github.com/getsentry/unity-docker/runs/5972377069?check_suite_focus=true#step:3:4)2e0-b0df-[5](https://github.com/getsentry/unity-docker/runs/5972377069?check_suite_focus=true#step:3:5)[6](https://github.com/getsentry/unity-docker/runs/5972377069?check_suite_focus=true#step:3:6)2[7](https://github.com/getsentry/unity-docker/runs/5972377069?check_suite_focus=true#step:3:7)03c[8](https://github.com/getsentry/unity-docker/runs/5972377069?check_suite_focus=true#step:3:8)c5ae.ps1:5
Line |
   5 |  Invoke-WebRequest -Headers $headers https://api.github.com/orgs/getse …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | {"message":"Requires
     | authentication","documentation_url":"https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization"}