-
Notifications
You must be signed in to change notification settings - Fork 23
49 lines (48 loc) · 1.84 KB
/
nightly-index-rebuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Nightly rebuild of all index files
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
workflow_call:
jobs:
index:
name: Rebuild index files
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v4
with:
submodules: true
- name: Prepare VM
uses: ./.github/actions/prepare
- name: Prepare s3cmd
uses: ./.github/actions/s3cmd
with:
s3_bucket: ${{ vars.AWS_BUCKET }}
s3_endpoint: ${{ vars.GLOBAL_RUN_ON_NEBIUS == 'yes' && vars.NEBIUS_AWS_ENDPOINT || vars.AWS_ENDPOINT }}
s3_website_suffix: ${{ vars.GLOBAL_RUN_ON_NEBIUS == 'yes' && vars.NEBIUS_AWS_WEBSITE_SUFFIX || vars.AWS_WEBSITE_SUFFIX }}
s3_key_id: ${{ vars.GLOBAL_RUN_ON_NEBIUS == 'yes' && secrets.NEBIUS_AWS_ACCESS_KEY_ID || secrets.AWS_ACCESS_KEY_ID }}
s3_key_secret: ${{ vars.GLOBAL_RUN_ON_NEBIUS == 'yes' && secrets.NEBIUS_AWS_SECRET_ACCESS_KEY || secrets.AWS_SECRET_ACCESS_KEY }}
folder_prefix: nebius-
build_preset: "release"
user: runner
- name: Create indices for main repo
if: ${{ github.repository == 'ydb-platform/nbs'}}
shell: bash
run: |
set -x
echo "::group::generate-listing"
python3 .github/scripts/index.py s3://${S3_BUCKET}/${GITHUB_REPOSITORY}/ --generate-indexes --remove-expired --apply
echo "::endgroup::"
env:
S3_BUCKET: ${{ vars.AWS_BUCKET }}
- name: Create indices for non-main repo
if: ${{ github.repository != 'ydb-platform/nbs'}}
shell: bash
run: |
set -x
echo "::group::generate-listing"
python3 .github/scripts/index.py s3://${S3_BUCKET}/${GITHUB_REPOSITORY}/ --ttl default=7d --ttl ya_archive=1d --generate-indexes --remove-expired --apply
echo "::endgroup::"
env:
S3_BUCKET: ${{ vars.AWS_BUCKET }}