Skip to content

Clear cache

Clear cache #3

Workflow file for this run

---
# yamllint disable rule:line-length
name: Clear cache
on:
schedule:
- cron: '30 1 * * 1-5'
workflow_dispatch:
jobs:
job1:
name: Clear Docker
if: always()
runs-on: ${{ matrix.runner_label }}
strategy:
matrix:
runner_label: ${{ fromJSON('["lionco-runner-1", "lionco-runner-2", "lionco-runner-3", "lionco-runner-4", "lionco-runner-5", "lionco-runner-6"]') }}
steps:
- name: Stop old containers
run: docker ps -q | grep -q . && docker stop $(docker ps -q) || echo "No containers to stop"
- name: Remove old containers
run: docker ps -a -q | grep -q . && docker rm $(docker ps -a -q) || echo "No containers to remove"
- name: Delete old images
run: docker system prune --volumes --all --force
job2:
name: Clear workspaces
if: always()
needs: job1
runs-on: ${{ matrix.runner_label }}
strategy:
matrix:
runner_label: ${{ fromJSON('["lionco-runner-1", "lionco-runner-2", "lionco-runner-3", "lionco-runner-4", "lionco-runner-5", "lionco-runner-6"]') }}
steps:
- uses: xembly/workflow-manager@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
run: clean
verbose: true