Skip to content

Remove TLS section #121

Remove TLS section

Remove TLS section #121

name: cleanup-docker-pr
on:
pull_request:
types: [closed]
env:
PR_NUMBER: ${{ github.event.number }}
OWNER: orgs/nanocurrency
PACKAGE_NAME: nano-docs
PER_PAGE: 100
jobs:
container_cleanup:
runs-on: ubuntu-latest
steps:
- name: Clean up PR specific container
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[0] == "pr-${{ env.PR_NUMBER }}") {
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)
}
}