Clean Docker registry (CRON) #5
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: Clean Docker registry (CRON) | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "43 20 * * *" # Every day at 20:43 | |
jobs: | |
clean: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17" | |
- name: Clean CI docker registry | |
env: | |
SCW_SECRET_KEY: ${{ secrets.SCW_CI_DEPLOY_SECRET_KEY }} | |
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }} | |
run: node devops/scripts/clean-docker-registry.js ci --apply-changes | |
- name: Clean Staging docker registry | |
env: | |
SCW_SECRET_KEY: ${{ secrets.SCW_PROD_DEPLOY_SECRET_KEY }} | |
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }} | |
run: node devops/scripts/clean-docker-registry.js staging --apply-changes | |
- name: Clean Production docker registry | |
env: | |
SCW_SECRET_KEY: ${{ secrets.SCW_PROD_DEPLOY_SECRET_KEY }} | |
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }} | |
run: node devops/scripts/clean-docker-registry.js production --apply-changes |