Skip to content

Add Ikara (#22)

Add Ikara (#22) #25

name: Upload Servers
on:
push:
branches:
- main
jobs:
upload-servers-json:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Validate servers & create index
run: |
python scripts/create_index.py
- name: Upload to R2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
CF_R2_BUCKET_NAME: ${{ secrets.CF_R2_BUCKET_NAME }}
CF_R2_URL: ${{ secrets.CF_R2_URL }}
run: |
aws s3 cp servers.json s3://${CF_R2_BUCKET_NAME}/server-repository/servers.json --endpoint-url https://${CF_R2_URL} --content-type "application/json" --cache-control "public, max-age=86400"