Adjust the current-release-notes redirection to V26.1 (#697) #139
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cleanup-docker-untagged | |
on: | |
push: | |
branches: | |
- main | |
env: | |
OWNER: orgs/nanocurrency | |
PACKAGE_NAME: nano-docs | |
PER_PAGE: 100 | |
jobs: | |
container_cleanup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clean up untagged containers | |
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 #v6.3.3 | |
with: | |
github-token: ${{ secrets.GHCR_TOKEN }} | |
script: | | |
const response = await github.request("GET /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions", | |
{ per_page: ${{ env.PER_PAGE }} | |
}); | |
for(version of response.data) { | |
if ( version.metadata.container.tags.length == 0 ) { | |
console.log("delete " + version.id) | |
const deleteResponse = await github.request("DELETE /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { }); | |
console.log("status " + deleteResponse.status) | |
} | |
} |