File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Upload Servers
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ upload-servers-json :
10+ needs : validate-servers-json
11+ if : github.ref == 'refs/heads/main'
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Set up Python 3.8
16+ uses : actions/setup-python@v1
17+ with :
18+ python-version : 3.8
19+ - name : Install dependencies
20+ run : |
21+ python -m pip install --upgrade pip
22+ pip install -r scripts/requirements.txt
23+ - name : Validate servers & create index
24+ run : |
25+ python scripts/create_index.py
26+
27+ - name : Upload to R2
28+ env :
29+ AWS_ACCESS_KEY_ID : ${{ secrets.CF_R2_ACCESS_KEY_ID }}
30+ AWS_SECRET_ACCESS_KEY : ${{ secrets.CF_R2_SECRET_ACCESS_KEY }}
31+ AWS_DEFAULT_REGION : ' us-east-1'
32+ AWS_S3_BUCKET_NAME : ' server-repository'
33+ CF_R2_URL : ${{ secrets.CF_R2_URL }}
34+ run : |
35+ aws s3 cp servers.json s3://${AWS_S3_BUCKET_NAME}/servers.json --endpoint-url https://${CF_R2_URL} --content-type "application/json" --cache-control "public, max-age=86400"
Original file line number Diff line number Diff line change 44 pull_request :
55 branches :
66 - main
7- push :
8- branches :
9- - main
107
118jobs :
129 validate-servers-json :
2522 - name : Validate servers & create index
2623 run : |
2724 python scripts/create_index.py
28-
29- upload-servers-json :
30- needs : validate-servers-json
31- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
32- runs-on : ubuntu-latest
33-
34- steps :
35- - name : Upload to R2
36- env :
37- AWS_ACCESS_KEY_ID : ${{ secrets.CF_R2_ACCESS_KEY_ID }}
38- AWS_SECRET_ACCESS_KEY : ${{ secrets.CF_R2_SECRET_ACCESS_KEY }}
39- AWS_DEFAULT_REGION : ' us-east-1'
40- AWS_S3_BUCKET_NAME : ' server-repository'
41- CF_R2_URL : ${{ secrets.CF_R2_URL }}
42- run : |
43- aws s3 cp servers.json s3://${AWS_S3_BUCKET_NAME}/servers.json --endpoint-url https://${CF_R2_URL} --content-type "application/json" --cache-control "public, max-age=86400"
You can’t perform that action at this time.
0 commit comments