MobilityData / gtfs-validator

Canonical GTFS Validator project for schedule (static) files.
https://gtfs-validator.mobilitydata.org/
Apache License 2.0
275 stars 100 forks source link

Automate cleaning of docker images when releasing gtfs-validator #1598

Open jcpitre opened 10 months ago

jcpitre commented 10 months ago

Describe the problem

During the release process, this document states that we have to 4. Remove all sha Docker images added since last release

This operation should be automated.

Proposed solution

Provide a github action (or modify an existing action, maybe publish_assets.yml?) that will do this.

A curl call to list versions is: curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $token" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/orgs/mobilitydata/packages/container/gtfs-validator/versions"

Appending the version ID at the end will provide data on the requested version only. Using DELETE will remove the version.

In the GH action, we can use actions/github-script@v6 in the step and call github.request to do the same as curl.

We need to use a token that has admin privileges at the organization level.

Alternatives you've considered

No response

Additional context

No response

davidgamez commented 7 months ago

Tasks: