Prune temporary docker images #115
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: 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 |