diff --git a/.github/workflows/container-cleanup.yml b/.github/workflows/container-cleanup.yml new file mode 100644 index 0000000..588eddc --- /dev/null +++ b/.github/workflows/container-cleanup.yml @@ -0,0 +1,26 @@ +name: Container Cleanup + +permissions: + contents: read + +on: + pull_request: + +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - name: Get a list of tagged docker images + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea + with: + script: | + const versions = await github.rest.packages.getAllPackageVersionsForPackageOwnedByOrg({ + package_type: 'container', + package_name: 'debian', + org: context.repo.owner, + per_page: 100, + state: 'active', + }); + for (const p of versions.data) { + console.log(p.metadata); + }