/
githubmirror
/
d2l-zh
Обзор
Документация
Войти
/
githubmirror
/
d2l-zh
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.github/workflows/clear-cache.yml
39 строк
1016 B
Anirudh Dagar
CI: Setup D2L Infra 2.0 with Github Actions (#1281)
09 авг 2023, 15:00
Не верифицирован
09 авг 2023, 15:00
b285792
Код
Авторство
О чём код?
name: Clear CI Cache on: workflow_dispatch: inputs: target_branch: type: choice description: Choose the cache associated branch options: - master - release cache_dir: type: choice description: Choose cache type, pull requests or push events options: - ci_cache_pr - ci_cache_push permissions: id-token: write contents: read jobs: clear_cache: name: Clear CI Cache runs-on: ubuntu-latest steps: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: arn:aws:iam::650140442593:role/D2L_CI_Clear_Cache role-duration-seconds: 3600 aws-region: us-west-2 - name: Delete Cache run: | CACHE_S3_URL="s3://preview.d2l.ai/${{ github.event.inputs.cache_dir }}/d2l-zh-${{ github.event.inputs.target_branch }}/" echo "Removing cache in $CACHE_S3_URL" aws s3 rm --recursive $CACHE_S3_URL