Skip to content

🧹 Clean stale build artifacts #33

🧹 Clean stale build artifacts

🧹 Clean stale build artifacts #33

Workflow file for this run

name: 🧹 Clean stale build artifacts
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * SUN"
jobs:
clean:
name: Clean
runs-on: ubuntu-22.04
container:
image: nycplanning/dev:latest
defaults:
run:
shell: bash
env:
GHP_TOKEN: ${{ github.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Load Secrets
uses: 1password/load-secrets-action@v1
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
BUILD_ENGINE_SERVER: "op://Data Engineering/EDM_DATA/server_url"
DOCKER_USERNAME: "op://Data Engineering/Dockerhub/username"
DOCKER_PASSWORD: "op://Data Engineering/Dockerhub/password"
- name: Delete build artifacts
run: python3 -m dcpy.builds.clean_artifacts schemas
- name: Delete docker images
run: python3 -m dcpy.builds.clean_artifacts dockerhub_tags