Skip to content

Cleanup Docker registry #1448

Cleanup Docker registry

Cleanup Docker registry #1448

Workflow file for this run

name: Cleanup Docker registry
on:
schedule:
- cron: "10 6 * * *"
repository_dispatch:
types: [cleanup]
workflow_dispatch:
env:
WERF_ENV: "production"
WERF_REPO: "ghcr.io/${{ github.repository_owner }}/werfio-guides"
jobs:
cleanup:
name: Cleanup
runs-on: ubuntu-latest-4-cores
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Install werf
uses: werf/actions/install@v2
- name: Cleanup
run: |
. $(werf ci-env github --as-file)
werf cleanup
env:
WERF_LOG_VERBOSE: "on"
WERF_REPO_GITHUB_TOKEN: ${{ secrets.REGISTRY_CLEANUP_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WERF_KUBE_CONFIG_BASE64: ${{ secrets.KUBECONFIG_BASE64_DEV }}
- name: Cleanup stages storage
run: |
. $(werf ci-env github --as-file)
werf cleanup
env:
WERF_LOG_VERBOSE: "on"
WERF_REPO_GITHUB_TOKEN: ${{ secrets.REGISTRY_CLEANUP_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WERF_REPO: "ghcr.io/werf/werfio-guides-stages"
WERF_WITHOUT_KUBE: "true"