forked from keptn/keptn
-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (28 loc) · 977 Bytes
/
cleanup_images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Clean up Images
# Note: This task requires Credentials for DockerHub (user + password) stored on GitHub
# However, it's not a good practice to store those credentials on GitHub.
# Please monitor https://github.com/docker/roadmap/issues/115 for changes
on:
workflow_dispatch:
#
# schedule:
# # * is a special character in YAML so you have to quote this string
# - cron: '0 0 * * 0'
jobs:
cleanup:
name: Clean up
runs-on: ubuntu-20.04
steps:
- name: Check out code.
uses: actions/[email protected]
- name: Load CI Environment from .ci_env
id: load_ci_env
uses: c-py/action-dotenv-to-setenv@v3
with:
env-file: .ci_env
- name: Clean up outdated images
env:
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
DOCKER_ORG: ${{ env.DOCKER_ORGANIZATION }}
run: ./gh-actions-scripts/cleanup_docker_images.sh