Skip to content

Nightly rebuild of all index files #290

Nightly rebuild of all index files

Nightly rebuild of all index files #290

name: Nightly rebuild of all index files
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
nebius:
type: string
default: "no"
description: "Run on nebius infrastructure"
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: ${{ inputs.nebius == 'yes' && vars.NEBIUS_AWS_ENDPOINT || vars.AWS_ENDPOINT }}
s3_website_suffix: ${{ inputs.nebius == 'yes' && vars.NEBIUS_AWS_WEBSITE_SUFFIX || vars.AWS_WEBSITE_SUFFIX }}
s3_key_id: ${{ inputs.nebius == 'yes' && secrets.NEBIUS_AWS_ACCESS_KEY_ID || secrets.AWS_ACCESS_KEY_ID }}
s3_key_secret: ${{ inputs.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 }}