Nightly rebuild of all index files #223
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: 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.AWS_ENDPOINT }} | |
s3_website_suffix: ${{ vars.AWS_WEBSITE_SUFFIX }} | |
s3_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
s3_key_secret: ${{ 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 }} |