Skip to content

Prune temporary docker images #165

Prune temporary docker images

Prune temporary docker images #165

name: Prune temporary docker images
on:
schedule:
- cron: '15 4 * * 6'
workflow_dispatch:
jobs:
prune-images:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Delete old temporary images
run: |
# the following command may fail because github package doesn't allow
# deletion if only one image exists or if DOCKER_MANAGEMENT_TOKEN is not
# setup. This shouldn't create any alarm as temporary image deletion is
# not a critical activity.
python ./.github/workflows/ci_scripts/ghcr_utils.py -u ${{ github.repository_owner }} -p ${{ secrets.DOCKER_MANAGEMENT_TOKEN }} delete-old-images -r mbed-os-env-tmp || true