|
| 1 | +# Copyright 2024 Flant JSC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +name: Cleanup dev registries |
| 16 | + |
| 17 | +env: |
| 18 | + MODULES_REGISTRY: ${{ vars.DEV_REGISTRY }} |
| 19 | + CI_COMMIT_REF_NAME: ${{ github.ref_name }} |
| 20 | + MODULES_MODULE_NAME: ${{ vars.MODULE_NAME }} |
| 21 | + MODULES_MODULE_SOURCE: ${{ vars.DEV_MODULE_SOURCE }} |
| 22 | + MODULES_REGISTRY_LOGIN: ${{ vars.DEV_MODULES_REGISTRY_LOGIN }} |
| 23 | + MODULES_REGISTRY_PASSWORD: ${{ secrets.DEV_MODULES_REGISTRY_PASSWORD }} |
| 24 | + WERF_DRY_RUN: "false" |
| 25 | + |
| 26 | +on: |
| 27 | + workflow_dispatch: |
| 28 | + schedule: |
| 29 | + - cron: "12 0 * * 6" |
| 30 | + |
| 31 | +defaults: |
| 32 | + run: |
| 33 | + shell: bash |
| 34 | + |
| 35 | +jobs: |
| 36 | + lint: |
| 37 | + runs-on: [self-hosted, regular, selectel] |
| 38 | + name: Run cleanup |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v4 |
| 41 | + - uses: deckhouse/modules-actions/setup@v1 |
| 42 | + |
| 43 | + - name: Cleanup |
| 44 | + run: | |
| 45 | + werf cleanup \ |
| 46 | + --repo ${MODULES_MODULE_SOURCE}/${MODULES_MODULE_NAME} \ |
| 47 | + --without-kube=true --config werf_cleanup.yaml |
0 commit comments